Skip to main content

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​

InputTypeRequiredDefaultWhat it is
ValueDateTimeYesDate (UTC).
PartStringYesWhich part to return; day_of_week is 1 for Monday to 7 for Sunday, week_of_year follows ISO 8601.
Time zoneStringNoUTCTime zone the part is read in: local (the runner's own), UTC or a name such as Asia/Kolkata.
LocaleStringNoenLanguage for day_name and month_name.

Outputs​

OutputTypeWhat it is
resultAnyThe part: a Number, or text for day_name and month_name.