Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I am working on making some weekly report where in i have to consider Saturday as Weekstart & Friday as weekend for calculation. I am trying by setting FirstWeekDay in Script. But i am not able to the required result. Please advise
=(WeekStart(Today())) is returning 21-08-2017 where as Saturday is 19-08-2017
Try this in your environment
SET DayNames='Sat;Sun;Mon;Tue;Wed;Thu;Fri';
Hi Manoj ,
Your script is ok.
Instead of this WeekStart(Today()) try this function WeekDay(WeekStart(Today()))
This is working for me:
=WeekDay(WeekStart(Today()))
=WeekDay(WeekEnd(Today()))
I agree, by using weekday() function it is returning the value. But i would need the weekstart & end dates for my calculation.
If I'm reading it right you may just need to change the line of script where it says:
SET FirstWeekDay=0;
to
SET FirstWeekDay=5;