Using the available date functions in report studio,How do I get the week ending sunday date of a particular date . For example, for 2006-01-04,week ending sunday date would be 2006-01-07.Any suggestions?
Thanks!
Saty,
Create the following data item in your query:
CASE _day_of_week([Date], 7)
Ã, WHEN (1) THEN (_add_days([Date], 6))
Ã, WHEN (2) THEN (_add_days([Date], 5))
Ã, WHEN (3) THEN (_add_days([Date], 4))
Ã, WHEN (4) THEN (_add_days([Date], 3))
Ã, WHEN (5) THEN (_add_days([Date], 2))
Ã, WHEN (6) THEN (_add_days([Date], 1))
Ã, WHEN (7) THEN ([Date])
Ã, ELSE ([Date])Ã, --- Or whatever you want as default.
END
Hope this helps.Ã, Keep us posted.
That worked.Thanks very much!
I'm glad it worked. Thanks for the update. Please close the thread (see board rules). Thanks.