πŸ“… Date Formatter

A powerful, flexible date formatting formula for Nordcraft.


πŸš€ Installation

formatDateFormulasPackage Formulas

πŸ“– Overview

formatDate

  • Multiple presets
  • Custom format strings
  • Internationalization
  • Timezone support
  • Smart auto-formatting

πŸ“₯ Inputs

InputTypeDefaultDescription
dateString(now)Date to format (ISO string, timestamp, or Date object)
formatString"auto"Preset or custom format string (see presets below)
localeString"en-US"Language/locale (e.g., 'en-US', 'fr-FR', 'es-ES')
timeZoneString"UTC"Timezone (e.g., 'UTC', 'America/New_York', 'Europe/London')

πŸ“‹ Format Presets

format

PresetExample Output
"iso"2026-07-24T14:30:00.000Z
"date"July 24, 2026
"date-short"2026-07-24
"date-slashed"07/24/2026
"date-eu"24/07/2026
"time"14:30:00
"time-12"2:30:00 PM
"datetime"Jul 24, 2026 14:30
"datetime-12"Jul 24, 2026 2:30 PM
"full"July 24, 2026 at 14:30:00 UTC
"full-12"July 24, 2026 at 2:30:00 PM UTC
"relative"2 days ago
"month"July
"month-short"Jul
"day"Friday
"day-short"Fri
"year"2026
"timestamp"1721821800000
"auto"Automatically chooses the best format

πŸ”§ Custom Format Tokens


Create your own format by combining these tokens in any order. The formula replaces each token with the actual value.

TokenMeaningExample
YYYYFull year (4-digit)2026
YYShort year (2-digit)26
MMMMFull month nameJuly
MMMShort month nameJul
MMMonth (2-digit)07
MMonth (1-12)7
DDDDFull day nameFriday
DDDShort day nameFri
DDDay (2-digit)24
DDay (1-31)24
HHHour (24-hour, 2-digit)14
HHour (24-hour, 0-23)14
hhHour (12-hour, 2-digit)02
hHour (12-hour, 1-12)2
mmMinute (2-digit)30
mMinute (0-59)30
ssSecond (2-digit)00
sSecond (0-59)0
SSSMillisecond (3-digit)123
AAM/PM (uppercase)PM
aAM/PM (lowercase)pm
ZTimezone offset+00:00
zTimezone abbreviationUTC
WDay of week (0-6)5
wwWeek number30
QQuarter (1-4)3

πŸ’‘ Usage Examples

Example 1: Auto Format (Smart)

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'auto'
}

Output:"Jul 24, 2026 14:30"


Example 2: ISO Format

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'iso'
}

Output:"2026-07-24T14:30:00.000Z"


Example 3: Custom Format

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'YYYY-MM-DD HH:mm:ss'
}

Output:"2026-07-24 14:30:00"


Example 4: Relative Time

Input:


{
date: '2026-07-22T14:30:00.000Z',
format: 'relative'
}

Output:"2 days ago""in 2 days"


Example 5: French Locale

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'full',
locale: 'fr-FR',
timeZone: 'Europe/Paris'
}

Output:"24 juillet 2026 Γ  16:30:00"


Example 6: Custom with Timezone

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'DDD, MMM D, YYYY at h:mm A',
timeZone: 'America/New_York'
}

Output:"Fri, Jul 24, 2026 at 10:30 AM"


Example 7: Just Date (Short)

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'date-short'
}

Output:"2026-07-24"


Example 8: 12-Hour Time

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'time-12'
}

Output:"2:30:00 PM"


Example 9: Day and Month Only

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'DDDD, MMMM DD'
}

Output:"Friday, July 24"


Example 10: Quarter and Year

Input:


{
date: '2026-07-24T14:30:00.000Z',
format: 'Q QTR, YYYY'
}

Output:"3 QTR, 2026"


Date Formatter

Supports all locales, timezones, and custom formats.

Open in editor
Built in Nordcraft The website builder for creative studios