extractField

The extractField task extracts a specific time field — such as day, month, year, or any other supported unit — from a given timestamp.

Potential use case

Use extractField when you need to pull a specific time component from a dataset, such as extracting just the year from a timestamp for sorting or reporting purposes.

Properties

IncomingTypeDescription
inputTimeObjectRequired. The time representation to extract a field from.
fieldEnumRequired. The field to extract. Allowed values are: Millisecond, Second, Minute, Hour, Day of Week, Day of Month, Day of Year, Week of Year, Month, Year.
outputFormatEnumThe format of the extracted value. Allowed values are: String, Number.
OutgoingTypeDescription
timeFieldValueStringThe extracted field value.

Example

In this example, the inputTime object pulls time fields from {"$ref": "timeProperties#/definitions/timeObject"}. The field selected is Year and outputFormat is String. Setting outputFormat to Number produces an identical result.

extractField task with field set to Year and outputFormat set to String

The outgoing timeFieldValue returns the year "2020".

Output showing timeFieldValue as 2020