Skip to main content

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

FormatExampleDescription
YYYY-MM-DD2024-01-15ISO date only
YYYY-MM-DD HH:mm:ss2024-01-15 14:30:00ISO datetime with space separator
YYYY-MM-DDTHH:mm:ss2024-01-15T14:30:00ISO datetime with T separator
MM/DD/YYYY01/15/2024US date format
DD/MM/YYYY15/01/2024European date format
YYYYMMDD20240115Compact date
YYYYMMDDHHmmss20240115143000Compact datetime
ISO2024-01-15T14:30:00ISO 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

InputTypeDescriptionDefault
InputTextThe datetime string to convert. Must strictly match the input format.
Input FormatEnumThe format of the input string. See supported formats table above.YYYY-MM-DD HH:mm:ss
Output FormatEnumThe desired output format. See supported formats table above.YYYY-MM-DD HH:mm:ss

Outputs

OutputTypeDescription
OutputTextThe 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 run or done events.
  • 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:

InputValue
Input2024-03-15 09:30:00
Input FormatYYYY-MM-DD HH:mm:ss
Output FormatMM/DD/YYYY

Result:

03/15/2024

Converting compact datetime to ISO format:

InputValue
Input20240315093000
Input FormatYYYYMMDDHHmmss
Output FormatISO

Result:

2024-03-15T09:30:00