Get part of date
Return one part of a date, such as the year, month, day of week, week of year or quarter, in a time zone.
Command in the Date and time toolkit · id ooa.datetime/get_part · 4 inputs (2 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Value | DateTime | Yes | Date (UTC). | |
| Part | String | Yes | Which part to return; day_of_week is 1 for Monday to 7 for Sunday, week_of_year follows ISO 8601. | |
| Time zone | String | No | UTC | Time zone the part is read in: local (the runner's own), UTC or a name such as Asia/Kolkata. |
| Locale | String | No | en | Language for day_name and month_name. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Any | The part: a Number, or text for day_name and month_name. |