Date
Date Format
Rewrites a date, date-time or timestamp column from one format into another; the result is a date, a date-time or a timestamp depending on the To format.
When to use it
Use it when a source system exports day-first dates and the destination expects month-first ones, when a database wants ISO dates, or to turn Unix timestamps into readable dates and back.
In a pipeline
File InputDate FormatExport CSV
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Column | select | Yes | — |
| From Format | select | Yes | AUTO |
| To Format | select | Yes | YYYY-MM-DD |
Example
Day-first dates to month-first
- Column=Order Date
- From Format=DD/MM/YYYY
- To Format=MM-DD-YYYY
| Order | Order Date |
|---|---|
| A-1 | 05/03/2024 |
| A-2 | 19/11/2024 |
| Order | Order Date |
|---|---|
| A-1 | 03-05-2024 |
| A-2 | 11-19-2024 |
5 March and 19 November are re-ordered and re-separated, not shifted.
Worth knowing
- The formats shown in the dropdowns are the ones used, so the node runs as soon as a column is picked: Auto-detect in, YYYY-MM-DD out.
- Formats are grouped as Date, Date & time and Timestamp (ISO 8601, Unix seconds, Unix milliseconds); the To format decides the type of the result.
- The column must hold dates, date-times or timestamps. If most of its values are not dates the run stops with a data type mismatch error; a few unreadable cells are left blank and reported.
- A bare number only counts as a Unix timestamp (ten digits or more) or as YYYYMMDD, so an ID column is never mistaken for dates.
- Pick the exact From format when dates could be read either way round; values in another unmistakable form, such as ISO, are still accepted.
- Empty cells are left as they are.