PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Get Week Number

Returns the week of the year a date falls in, using the week rules you choose.

Get Week Number returns the number of the week of the year that a date falls in, for example 46. Use it for weekly reports, weekly folders or to group records by week. You choose which day starts the week and how the first week of the year is counted.

Add the action

In the Process Designer toolbox, open DateTime and pick Get Week Number (or type Get Week Number in the search box).

The Get Week Number action properties: Date, First Week Rule, First Day Of Week and Week Number

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
DateInputDate and timeYesThe date to get the week number for.
First Week RuleInputOption listYesHow week 1 of the year is chosen. See the options below.
First Day Of WeekInputOption listYesSunday or Monday: the day each week starts on.
Week NumberOutputIntegerYesThe week of the year, from 1 to 53 (54 in rare cases with FirstDay).

First Week Rule options:

  • FirstDay: week 1 is the week that contains 1 January, however few days of it are in the new year.
  • FirstFullWeek: week 1 starts on the first First Day Of Week of the year. Days before it belong to the last week of the previous year.
  • FirstFourDayWeek: week 1 is the first week that has at least four days in the new year.

Example

DateFirst Week RuleFirst Day Of WeekWeek Number
2026-11-10FirstDaySunday46
2026-11-10FirstFourDayWeekMonday46
2027-01-01 (a Friday)FirstDayMonday1
2027-01-01FirstFullWeekMonday52
2027-01-01FirstFourDayWeekMonday53
2024-12-30 (a Monday)FirstFourDayWeekMonday53

Good to know

  • The result is always counted inside the calendar year of the date. Early-January and late-December dates can get 52 or 53.
  • FirstFourDayWeek with Monday is close to the ISO 8601 week, but not the same at the end of the year: ISO puts 2024-12-30 in week 1 of 2025, this action returns 53. Check the last days of December if you need strict ISO weeks.
  • A date with a UTC offset is first converted to UTC. An empty Date stops the step with an error.

On this page