DateTime
Get Week Number
5min
This action returns the week number for a DateTime.
Obs: The week number indicates where the week falls numerically within a year.
![Document image Document image](https://images.archbee.com/pD-o7nZLwDiSBwGlsHA9q/vEicfs6FML4ql8QOLhXTy_image.png?format=webp)
- [ I ] Date: DateTime for which to get the week number.
- [ I ] First week rule: Drop-down
- First Day ➜ Indicates that the first week of the year starts on the first day of the year and ends before the following designated first day of the week.
- First Full Week ➜ Indicates that the first week of the year is the first week with four or more days before the designated first day of the week.
- First Four Day Week ➜ Indicates that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year.
- [ I ] First day of week: Drop-down
- Sunday ➜ Uses Sunday as first day of the week.
- Monday ➜ Used Monday as first day of the week.
- [ O ] Week number: Integer representing the extracted week number.
![Document image Document image](https://images.archbee.com/pD-o7nZLwDiSBwGlsHA9q/d4PXzv3pHLokG5Cf6MJjX_tdy.png?format=webp)
- Drag action onto canvas to get familiarized with it.
![Document image Document image](https://images.archbee.com/pD-o7nZLwDiSBwGlsHA9q/F_UPAxpyhZQO669Tu0J8g_tdy.png?format=webp)
- Declare some variables to be used with the action.
![Document image Document image](https://images.archbee.com/pD-o7nZLwDiSBwGlsHA9q/prqK4m6pZAcSH3ypKErpj_tdy.png?format=webp)
- Assign the newly created variables.
- Save & Run the process and then Check Instance to see the output.
![Document image Document image](https://images.archbee.com/pD-o7nZLwDiSBwGlsHA9q/scZ82wRvHqYAY6S9rAemL_tdy.png?format=webp)
- Determining the week number for a given date.
Updated 16 Feb 2024
![Doc contributor](https://s3.amazonaws.com/archbee-animals/koala.png)
Did this page help you?