Convert Datetime Format
Uncontrolled node
Overview
Converts datetime strings from one format to another without changing the timezone or wall-clock time. This node performs strict parsing—the input string must exactly match the specified input format, or the node will return an error.
Unlike the Convert Timezone node, this node does not adjust for timezones; it only reformats the string representation of the date and time.
Supported Formats
| Format | Example | Description |
|---|---|---|
| YYYY-MM-DD | 2024-01-15 | ISO date only |
| YYYY-MM-DD HH:mm:ss | 2024-01-15 14:30:00 | ISO datetime with space separator |
| YYYY-MM-DDTHH:mm:ss | 2024-01-15T14:30:00 | ISO datetime with T separator |
| MM/DD/YYYY | 01/15/2024 | US date format |
| DD/MM/YYYY | 15/01/2024 | European date format |
| YYYYMMDD | 20240115 | Compact date |
| YYYYMMDDHHmmss | 20240115143000 | Compact datetime |
| ISO | 2024-01-15T14:30:00 | ISO 8601 (no timezone) |
Strict Parsing
The input string must exactly match the selected Input Format. For example, if the input format is YYYY-MM-DD, providing 2024-01-15 14:30:00 will result in an error.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Input | Text | The datetime string to convert. Must strictly match the input format. | — |
| Input Format | Enum | The format of the input string. See supported formats table above. | YYYY-MM-DD HH:mm:ss |
| Output Format | Enum | The desired output format. See supported formats table above. | YYYY-MM-DD HH:mm:ss |
Outputs
| Output | Type | Description |
|---|---|---|
| Output | Text | The datetime string converted to the output format. Returns an error object if parsing fails or if the date is invalid (e.g., February 30th). |
Runtime Behavior and Defaults
- Uncontrolled: This node runs automatically whenever the input data changes. It does not require an event trigger and has no
runordoneevents. - Validation: The node validates that the input date is calendar-correct (e.g., checks days in month, leap years). Invalid dates will return an error.
- Date-Only Output: If the output format is date-only (e.g.,
YYYY-MM-DD,MM/DD/YYYY), time components are dropped from the output. - No Timezone Conversion: The node preserves the wall-clock time. It does not convert between timezones—use the Convert Timezone node for that functionality.
Example
Converting ISO datetime to US date format:
| Input | Value |
|---|---|
| Input | 2024-03-15 09:30:00 |
| Input Format | YYYY-MM-DD HH:mm:ss |
| Output Format | MM/DD/YYYY |
Result:
03/15/2024
Converting compact datetime to ISO format:
| Input | Value |
|---|---|
| Input | 20240315093000 |
| Input Format | YYYYMMDDHHmmss |
| Output Format | ISO |
Result:
2024-03-15T09:30:00