Format Date to String

Last updated on May 30, 2023
Description: Format a datetime value to a string value.
Available Filters: All Events, Event Type, Event Field.
All Fields, Field Name, Field Value.
Settings: String Format: The new format for displaying the datetime value.
- Use uppercase M to denote month (dd-MM-YYYY), and lowercase m to denote minutes (HH-mm-ss).
- Read DateTimeFormat for the list of supported patterns and formats.
Transformation Considerations: - Automatic detection of all date fields in an Event is not currently supported.

Sample Transformation

Scenario: Display the value in the publish_date field in all Events of the catalog.book Event Type in yyyy-mm-dd hh:mm:ss format.

Filters:

  • Event Type = catalog.book
  • Fields = All fields with name = publish_date

Settings:

  • String Format: yyyy-mm-dd hh:mm:ss

Date to String

Result: When you test the Transformation, the publish_date value, 1040033430000 is converted into 2002-10-16 10:10:30, and the data type changes from timestamp to varchar.

Format date to string


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