Datetime
Uncontrolled node
Overview
The Datetime node formats a date/time value. If an input is supplied (number, Date or ISO string) it is used. Otherwise, “now” is used. The default mask is “YYYY-MM-DD HH:mm:ss”.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Input | Text | A timestamp, Date, or ISO string | - |
Outputs
Output | Type | Description |
---|---|---|
Output | Text | The formatted date/time value |
Panel Controls
The Datetime node has two panel controls:
-
Format: This is an enum that allows you to select from a variety of date/time formats.
- Common formats include:
YYYY-MM-DD
YYYY-MM-DD HH:mm:ss
HH:mm:ss
MM/DD/YYYY
DD/MM/YYYY
YYYYMMDD
YYYYMMDDHHmmss
YYYY-MM
YYYY
DD MMM YYYY
MMM DD, YYYY
DD MMMM YYYY
MMMM DD, YYYY
ISO
timestamp
timestamp_s
- Common formats include:
-
Timezone: This is an enum that allows you to select from a variety of timezones.
Example Use Cases
- Formatting the current date and time in a specific format.
- Converting a timestamp to a human-readable date and time.
- Formatting a date and time in a specific timezone.