Value Converter#
The Value Converter node can be used to convert variables from one type to another.
For example, you can convert date to text or text to date.
Dates, Times, or Timestamps to Text#
When converting times, dates, or timestamps to text, you will have to provide a formatter pattern. You can use this syntax to set a custom pattern:
Pattern | Meaning | Example Input | Example Output |
---|---|---|---|
G |
Era designator (e.g., AD or BC) | 2025-02-26 | AD |
y |
Year (numeric) | 2025-02-26 | 2025 |
M |
Month in year (no leading zero) | 2025-02-26 | 2 |
MM |
Month in year (2 digits) | 2025-02-26 | 02 |
MMM |
Abbreviated month name | 2025-02-26 | Feb |
MMMM |
Full month name | 2025-02-26 | February |
w |
Week in year | 2025-02-26 | 9 |
W |
Week in month | 2025-02-26 | 4 |
D |
Day in year | 2025-02-26 | 57 |
d |
Day in month | 2025-02-26 | 26 |
F |
Day of week in month (nth occurrence) | 2025-02-26 | 4 |
E |
Day name in week (short form) | 2025-02-26 | Wed |
EEEE |
Day name in week (full form) | 2025-02-26 | Wednesday |
u |
Day number of week (1 = Monday, …, 7 = Sunday) | 2025-02-26 | 3 |
a |
AM/PM marker | 2025-02-26 14:30 | PM |
H |
Hour in day (0-23) | 2025-02-26 14:30:45 | 14 |
k |
Hour in day (1-24) | 2025-02-26 14:30:45 | 14 |
K |
Hour in am/pm (0-11) | 2025-02-26 14:30:45 | 2 |
h |
Hour in am/pm (1-12) | 2025-02-26 14:30:45 | 2 |
m |
Minute in hour | 2025-02-26 14:30:45 | 30 |
s |
Second in minute | 2025-02-26 14:30:45 | 45 |
S |
Millisecond | 2025-02-26 14:30:45.123 | 123 |
z |
General time zone (short) | 2025-02-26 14:30:45 PST | PST |
Z |
RFC 822 time zone (numeric offset) | 2025-02-26 14:30:45 PST | -0800 |
X |
ISO 8601 time zone (short format) | 2025-02-26 14:30:45 PST | -08 |
yyyy-MM-dd |
Year-Month-Day in numeric form | 2025-02-26 | 2025-02-26 |
dd/MM/yyyy |
Day/Month/Year in numeric form (with slashes) | 2025-02-26 | 26/02/2025 |
HH:mm:ss |
24-hour time with seconds | 2025-02-26 14:30:45 | 14:30:45 |
dd.MM.yyyy kk:mm:ss |
Day.Month.Year with hour in day (1-24), minutes, and seconds | 2025-02-26 14:30:45 | 26.02.2025 14:30:45 |
Example 1:
A formatter pattern of dd.MM.yyyy kk:mm:ss
will give you the typical European 24-hour text
output: 30.01.2022 19:00:00
Example 2:
A formatter pattern of yyyy/M/d h:mm a
will give you the typical North American 12-hour text
output: 2022/1/30 7:00 PM
Note that if the month is September and you specify M
, you will get 9
. If you specify MM
you will get the month
value with a leading 0: 09
.
See Flow Designer