Datetime Now
Controlled node
Overview
A controlled node that outputs the current date and time in a specified format and timezone. Unlike the uncontrolled Datetime node which formats an existing date, Datetime Now captures the exact moment the node is triggered and outputs it as a formatted string.
This node is useful for timestamping workflow runs, creating time-based filenames, logging events, or any scenario where you need the current wall-clock time in a specific format.
Output Events
There is one output event option for this node:
- Done: This fires when the node has finished running, indicating the current datetime has been captured and formatted.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Fires when the node starts running to capture the current datetime. | - |
| Format | Enum | The output format for the datetime string. | YYYY-MM-DD HH:mm:ss |
| Timezone | Enum | The timezone to use for the output. Defaults to the user's local timezone. | Local system timezone |
Format Options
| Format | Description | Example Output |
|---|---|---|
| YYYY-MM-DD | ISO date only | 2025-01-15 |
| YYYY-MM-DD HH:mm:ss | ISO date with time | 2025-01-15 14:30:45 |
| YYYY-MM-DDTHH:mm:ss | ISO 8601 format (no timezone) | 2025-01-15T14:30:45 |
| HH:mm:ss | Time only | 14:30:45 |
| MM/DD/YYYY | US date format | 01/15/2025 |
| DD/MM/YYYY | European date format | 15/01/2025 |
| YYYYMMDD | Compact date | 20250115 |
| YYYYMMDDHHmmss | Compact datetime | 20250115143045 |
| YYYY-MM | Year and month | 2025-01 |
| YYYY | Year only | 2025 |
| DD MMM YYYY | Day Month Year (abbreviated) | 15 Jan 2025 |
| MMM DD, YYYY | Month Day, Year | Jan 15, 2025 |
| DD MMMM YYYY | Day Month Year (full) | 15 January 2025 |
| MMMM DD, YYYY | Month Day, Year (full) | January 15, 2025 |
| ISO | ISO 8601 format | 2025-01-15T14:30:45Z |
| timestamp | Unix timestamp (milliseconds) | 1705327845000 |
| timestamp_s | Unix timestamp (seconds) | 1705327845 |
Timezone Options
The node supports all major timezones including:
- UTC (Universal)
- Americas: America/New_York, America/Chicago, America/Denver, America/Los_Angeles, America/Toronto, America/Sao_Paulo, etc.
- Europe: Europe/London, Europe/Paris, Europe/Berlin, Europe/Moscow, etc.
- Asia-Pacific: Asia/Tokyo, Asia/Shanghai, Asia/Singapore, Australia/Sydney, etc.
- Africa: Africa/Johannesburg, etc.
Outputs
| Output | Type | Description |
|---|---|---|
| Output | Text | The current datetime formatted according to the specified format and timezone. |
| Done | Event | Fires when the node has finished executing. |
Runtime Behavior and Defaults
When the Run event is triggered, the node captures the current system time immediately. It then formats this timestamp using the selected Format and converts it to the specified Timezone before outputting the result.
- Default Format:
YYYY-MM-DD HH:mm:ss(e.g., "2025-01-15 14:30:45") - Default Timezone: The user's local system timezone (determined via
Intl.DateTimeFormat().resolvedOptions().timeZone), falling back to UTC if unavailable. - Execution: The node executes synchronously and fires the Done event immediately after formatting the output.
Example Usage
Basic Timestamp Logging
Connect a Start node to the Run input of Datetime Now, then connect the Output to a Set Variable node to store the workflow start time:
Start → [Run] Datetime Now [Output] → Set Variable (name: "startTime")
Filename Generation
Use the output to create time-stamped filenames by connecting the Output to a Text node with a template:
Text Node Template:
report_{{datetime}}.csv
Where {{datetime}} is connected to the Datetime Now output with format set to YYYYMMDD.
Conditional Scheduling
Connect the Done event to trigger subsequent nodes that depend on the current time, such as checking if it's business hours before sending notifications:
Datetime Now [Done] → [Run] If (test: isBusinessHours)
Timezone Conversion
To get the current time in a specific timezone (e.g., Tokyo) while running the workflow elsewhere:
- Set Timezone to
Asia/Tokyo - Set Format to
YYYY-MM-DD HH:mm:ss - The output will show the current time in Tokyo regardless of where the workflow is executed.