Parse Date from String

Last updated on May 30, 2023
Description: Parse a string value to a datetime object.
Available Filters: Event Filters:
- Event Type
- Event Field

Field Filters:
- Field Name
- Field Value
Settings: String Format: The string format in which the date is currently stored.
Transformation Considerations: - Read DateTimeFormat for the list of supported patterns and formats.

Sample Transformation

Scenario: Convert the joining_date value to a timestamp in all Events of the agents Event Type.

Filters:

  • Event Type = agents
  • Fields = All fields with name = joining_date

Settings:

  • String Format (in which the date exists) = yyyy-MM-dd hh:mm:ss. You can also use yyyy-MM-dd KK:mm:ss as the format.

Result: When you test the Transformation, the date in the joining_date field, 2002-12-31 11:20:30 is converted to 1041333630000, and the data type is changed from varchar to timestamp.


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jan-04-2023 NA Enhanced the content for clarity.
Nov-10-2022 NA Created as a new document.

Tell us what went wrong