Hi Gurus,
how to extract weekend date from the current date.
Ex: I need to get the dynamic weekend dates from the souce of dates which has all weekend dates... when I run a report I need to get the weekend date of that particular week dynamically.
i.e..If I run the report in this week I need to get 8-7-2011 dynamically.cos as 8-7-2011 will be last day of weekend.
Regards,
Ram
You'll need to use a dayofweek function for this. Essentially you need to do something like:
add_days([Date], (7 - dayOfWeek([Date])))
Depending on your DB settings this would either return the Sunday or Saturday.
If you're using Oracle you could use the next_day function. next_day([Date],'Saturday')