This operation allows you to convert dates and times from one format to another. This is useful for standardizing timestamps, converting between systems with different date/time formats, or simply making a date more readable.
Data types
These are the input/output expected data types for this operation:
Input data
- Strings representing the dates you want to convert.
Output data
- Output formatted date strings.
Parameters
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Input Format*
Specify the format of your input date strings.
Note that the reference date that you must use for both the Input Format and Output Format parameters is the following:
Date - January 02, 2006
Time - 15:04:05
That means you must specify the format of your input dates using the date and time above. For example, for the following input date:
2024-10-24T14:11:13Z
you must specify the format as follows:
2006-01-02T15:04:05Z
The following formats are supported for both the Input Format and Output Format parameters:
RFC3339 (for example 2006-01-02T15:04:05Z)
ANSIC (for example Mon Jan 2 15:04:05 2006)
UnixDate (for example Mon Jan 2 15:04:05 PST 2006)
Custom format (for example 02-01-2006 15:04:05)
Input Timezone*
Specify the timezone of the input date strings. Enter one of the following:
UTC
GMT
PST
PDT
CET
CEST
Any IANA time zone
Output Format*
Specify the desired format of your output date strings.
Note that the reference date that you must use for both the Input Format and Output Format parameters is the following:
Date - January 02, 2006
Time - 15:04:05
Following the example in the Input Format parameter, imagine you have this input date 2024-10-24T14:11:13Z and set the Input Timezone to UTC+1.
If you enter the following in the Output Format parameter:
02/01/2006 15:04:05
and set Output Timezone to UTC+8, you will get this as your output date:
24/10/2024 21:11:13
The following formats are supported for both the Input Format and Output Format parameters:
RFC3339 (for example 2006-01-02T15:04:05Z)
ANSIC (for example Mon Jan 2 15:04:05 2006)
UnixDate (for example Mon Jan 2 15:04:05 PST 2006)
Custom format (for example 02-01-2006 15:04:05)
Output Timezone*
Specify the timezone of the output date strings. Enter one of the following:
UTC
GMT
PST
PDT
CET
CEST
Any IANA time zone
Example
Suppose you want to convert a series of dates in the following format:
MM-DD-YYYY HH:mm:ss
into this one:
ddd, D MMM YYYY HH:mm:ss ZZ
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Translate Datetime Format.
Set Input Format to 01-02-2006 15:04:05
Set Input Timezone to UTC+1
Set Output Format to Mon, 2 Jan 2006 15:04:05 +0000
Set Output Timezone to UTC+1
Give your Output field a name and click Save. The format of the dates in your input field will be transformed. For example:
05-20-2023 10:10:45 -> Sat, 20 May 2023 10:10:45 +0000
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.