n8n LabAdvanced
Format an ISO Date String in n8n
An API returns timestamps like 2026-11-08T10:30:00Z. Your client wants dates as dd/MM/yyyy in the report.
Live Execution Simulator
Idle
π₯
Incoming Data
βοΈ
n8n Node
π―
Next Step
> Ready. Type your expression below and click "Check Answer" to run the node.
Incoming Payload / Data:
{
"created_at": "2026-11-08T10:30:00Z"
}
DateTime.fromISO($json.created_at).
Press Enter or click Check Answer. +30 XP
β Solution & explanation
DateTime.fromISO($json.created_at).toFormat('dd/MM/yyyy')
Output: 08/11/2026
DateTime.fromISO() parses an ISO 8601 string into a Luxon DateTime, then toFormat() prints it with your pattern. n8n also lets you write $json.created_at.toDateTime().π‘ Pro tip: Convert timezones before formatting: .setZone('Asia/Dubai').toFormat('dd/MM/yyyy HH:mm').