extractField
  • 23 May 2023
  • Dark
    Light
  • PDF

extractField

  • Dark
    Light
  • PDF

Article summary

extractField Task Purpose

The extractField task is used to extract a time field that may consist of the day, month, year, or any other field from a given time.

Potential Use Case

If you need to know a timestamp from a dataset then you could use the extractField task to pull the time variable that is needed.

Properties

Input and output parameters are shown below.

Incoming Type Description
inputTime Object Required. The time representation to extract a field from.
field Enum Required. 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.
outputFormat Enum Represents a humanize-string or numeric value. Allowed values are: String, Number.


Outgoing Type Description
timeFieldValue String The extracted field value.

Example

In this example the inputTime object is pulling time fields from {"$ref": "timeProperties#/definitions/timeObject"}, and the Field value selected from the dropdown list is Year.

The OutputFormat will be shown as a String. You can also set the OutputFormat to show as a Number and the result will be identical to that shown for a String.

extractFieldYear

The outgoing result shows the timeFieldValue as the year "2020".

extractFieldYearResult


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.