Getting week number from a date

I am taking orders from Shopify and posting each line item to a Google Sheet.

I need to make a report in the Google Sheet that runs by week.

For each line item from Shopify I want to get the weeknumber or I think even better would be the date of the Sunday at the end of the week the day falls in.

Is this possible with the date time functions? In Google Sheets I know I can simply use =WeekNum

According to the Tokens you can use to format a date variable, you can use w.

e.g.: {{ formatDate(now; "w") }}

3 Likes