mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
1.0 KiB
1.0 KiB
| description | contentType |
|---|---|
| Methods for working with date and time. | reference |
Built-in date and time methods
Methods for working with date and time. Some methods and variables aren't available in the Code node.
| Method | Description | Available in Code node? |
|---|---|---|
$now |
A Luxon object containing the current timestamp. Equivalent to DateTime.now(). |
✅ |
$today |
A Luxon object containing the current timestamp, rounded down to the day. Equivalent to DateTime.now().set({ hour: 0, minute: 0, second: 0, millisecond: 0 }). |
✅ |
n8n passes dates between nodes as strings, so you need to parse them. Luxon helps you do this. Refer to Date and time with Luxon for more information.
n8n provides built-in convenience functions to support data transformation in expressions for dates. Refer to Data transformation functions | Dates for more information.