Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a field within my load script for "Week Ending" where our weeks end at the end of every Friday.
I'm able to use the WeekEnd function and get a "Week Ending" date in my tables using the following load statement, but it returns the standard "Week Ending" date of end of every Sunday. Does anyone know how I can modify the script to subtract 2 days to get my weeks to end on Friday?
This is the load statement that has worked for me so far to get Week Ending as of end of Sunday:
date(WeekEnd(D), 'MM/DD/YY') as [Week Ending]
NOTE: "D"=my date field (which is not in MM/DD/YY format)
May be like this:
Date(WeekEnd(D, 0, 5), 'MM/DD/YY') as [Week Ending]
Yes, that worked! Thank you!