Skip to main content

Datetime: Date Format

Render a Date, Time or DateTime value as a string using a strftime-style format. See the chrono strftime reference for the full list of specifiers.

Example
Format: %d/%m/%Y → Date(2024-06-15) → "15/06/2024"
Format: %Y → Date(2024-01-01) → "2024"
Format: %H:%M → Time(14:30:00) → "14:30"
Format: %Y-%m-%d %H:%M:%S → DateTime(2024-06-15T14:30:00Z) → "2024-06-15 14:30:00"

Parameters

FormatREQUIRED

strftime format string. Defaults to %Y-%m-%d (ISO date). Common patterns: %Y-%m-%d, %d/%m/%Y, %H:%M:%S, %Y-%m-%dT%H:%M:%S%z.

Input

DateREQUIRED

A Date, DateTime, or Time value to format.

Output

String
The formatted text.