Last day of the week

i have a column with some random dates, for example today date 20/09/2024.
I need another column to show the last day of the week for 20/09/2024. I’ve tried different math formulas but didn’t work. Thank you

Kind regards

Do you consider Saturday or Sunday the end of the week?

I’m not a expert with dates. Actually dates confuse me because of each country’s time zone :joy:

I just tried to edit this formula which @ThinhDinh shared and got a good result. ( possible with js too but afraid to write because not sure if it work with device time zone :slightly_smiling_face: ) Maybe the legends could confirm? (not tagging because it will be a disturbance :wink: so naming them would be Jeff, Darren, Thinh, Robert and others)

Thinh’s post : How do I get the start date of current week? - #2 by ThinhDinh

Thinh’s formula : N-WEEKDAY(N)+2-HOUR(N)/24-MINUTE(N)/1440-SECOND(N)/86400

Edited formula by me: N - WEEKDAY(N) + 8 - HOUR(N)/24 - MINUTE(N)/1440 - SECOND(N)/86400

Result :

image

Thank you and have a great weekend!

3 Likes

I don’t think the hour minute second stuff is necessary in this case, but otherwise the rest of it would make sense. Just depends on what’s considered the end of the week. For me it’s Saturday, but for others it’s Sunday.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.