convert-date-to-text
Description
convert-date-to-text
adaptor can be used to convert a date/time value to text in a specified format.
If no input value is provided, the current date/time will be used.
Inputs
value
Type: text
Required: No
The input date/time value. If unspecified, the current date/time will be used.
format
Type: text
Required: No
The format of data in column one based on Unicode Technical Standard #35. If unspecified, defaults to ISO 8601 date/time.
locale
Type: text
Required: No
A language locale to be used when formatting the values. If unspecified, it defaults to en-US
.
timezone
Type: text
Required: No
The three letter code of the timezone (e.g., UTC).
Outputs
text
Type: text
The date as a formatted text.
Examples
Example 1: Default behaviour.
Inputs:
No inputs provided.
Outputs:
text
: 2020-02-28T08:00:00+00:00
-> As no inputs were provided, the current date/time was retuned.
Example 2: Formatted date.
Inputs:
format
: MM/dd/yyyy
Outputs:
text
: 02/28/2020
-> Provided a format to return a month-day-year date string.
Example 3: Formatted time.
Inputs:
format
: HH:mm
Outputs:
text
: 08:00
-> Provided a format to return only the current time.
Example 4: Formatted time with locale code.
Inputs:
format
: MMMM
locale
: es
Outputs:
text
: febrero
-> In this example, we set locale
input to es
(the ISO 639 language code for Spanish) to get the name of the current month in Spanish.
Use Cases
Adding a timestamp by leaving the input date/time blank.
Last updated