# Getting week number from a date

**URL:** <https://community.make.com/t/getting-week-number-from-a-date/33349>\
**Category:** Questions\
**Tags:** date-time-functions\
**Created:** [April 10, 2024, 2:30pm UTC](https://community.make.com/t/getting-week-number-from-a-date/33349 "2024-04-10T14:30:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stuart\_Leech](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@Stuart\_Leech](https://community.make.com/u/Stuart_Leech)\
**Post date:** [April 10, 2024, 2:30pm UTC](https://community.make.com/t/getting-week-number-from-a-date/33349/1 "2024-04-10T14:30:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [April 10, 2024, 2:32pm UTC](https://community.make.com/t/getting-week-number-from-a-date/33349/2 "2024-04-10T14:32:04Z")

</div>

According to the [Tokens](https://www.make.com/en/help/functions/tokens-for-date-time-formatting) you can use to format a date variable, you can use `w`.

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

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [May 14, 2024, 6:49am UTC](https://community.make.com/t/getting-week-number-from-a-date/33349/3 "2024-05-14T06:49:07Z")

</div>


