Date & Time with Luxon in n8n

From the n8n cheat sheet · Expression Syntax · verified Jul 2026

Date & Time with Luxon

Built-in date/time manipulation using Luxon

javascript
# Current Time
{{ $now.toISO() }}                    // 2024-01-15T14:30:00.000Z
{{ $now.toFormat('yyyy-MM-dd') }}     // 2024-01-15
{{ $today.toISO() }}                  // Midnight today

# Date Arithmetic
{{ $now.plus({ days: 7 }).toISO() }}  // 7 days from now
{{ $now.minus({ hours: 2 }) }}        // 2 hours ago

# Parsing & Formatting
{{ '2024-01-15'.toDateTime('yyyy-MM-dd') }}
{{ $now.toFormat('MMMM dd, yyyy') }}  // January 15, 2024
{{ $now.toRelative() }}               // "2 hours ago"
⚡ $now and $today are Luxon DateTime objects
💡 Use .plus() and .minus() for date arithmetic
📌 .toFormat() accepts custom format strings
🎯 Chain methods: $now.plus({days:7}).toFormat("yyyy-MM-dd")

More n8n tasks

Back to the full n8n cheat sheet