Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have tried changing week start to Sunday using this code: WeekStart(Datefield, 0, -1) as WeekStart and this works as expected. When I choose a particular week number, it displays dates starting from Sunday of that week until Saturday which is fine. But the problem is, when I choose the last week (say, week 53) in a particular year (say, 2015) I don't see all 7 dates, as few dates would belong to next year. I would like to include these dates also into previous week. How can this be achieved?
Attached in my example, When I choose, week 53 of 2015, would like to include 1st and 2nd Jan of 2016 too.
Thank you.
Check WeekYear function
Week(DateField) & '-' & WeekYear(DateField) as WeekYear
Thanks for the response.
I just added that piece of code to my script and this is what I see. Is there something else that i have to add to my script?
Week(TempOrderDate+1) & '-' & WeekYear(TempOrderDate+1) as OrderWeekYear
Change field names accordingly.
It still shows the same thing.
What are the dates you are looking for?
When I choose Week 53 of 2015, i have to see the following dates in my date field:
12/27/2015
12/28/2015
12/29/2015
12/30/2015
12/31/2015
1/1/2016
1/2/2016
By using this...
Week(TempOrderDate+1) & '-' & WeekYear(TempOrderDate+1) as OrderWeekYear
I got what you are looking for.
Don't use WeekStart or anthing else.. If you are still not getting, upload your sample app