Hi all,
I have the dates below:
2023-01-13
2023-01-20
2023-01-27
2023-02-03
2023-02-03
2023-02-03
2023-02-10
2023-09-15
2023-02-03
What i'm trying to figure is how to calculate how many days it is until the next Friday from these dates it should be easy enough but i cant seem to get my head around it.
Cheers for nay help in advance
I would use something like 5-DateTimeFormat([Date], "%w"). %w returns the day of the week as a number from 0-6, starting on Sunday. Friday would be a 5 so it would be subtracting the day from 5.
hi @Deano478
Here's how I'd approach:
fyi - this technically this is "the next friday" - calculating days till "next friday" - ie the next occuring friday after "this friday" would require wrapping @binuacs 's nifty 5-xxxx statement in a mod(...,5) to correctly skip this friday.