Skip to main content

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

InputTypeDescriptionDefault
RunEventFires when the node starts running to capture the current datetime.-
FormatEnumThe output format for the datetime string.YYYY-MM-DD HH:mm:ss
TimezoneEnumThe timezone to use for the output. Defaults to the user's local timezone.Local system timezone

Format Options

FormatDescriptionExample Output
YYYY-MM-DDISO date only2025-01-15
YYYY-MM-DD HH:mm:ssISO date with time2025-01-15 14:30:45
YYYY-MM-DDTHH:mm:ssISO 8601 format (no timezone)2025-01-15T14:30:45
HH:mm:ssTime only14:30:45
MM/DD/YYYYUS date format01/15/2025
DD/MM/YYYYEuropean date format15/01/2025
YYYYMMDDCompact date20250115
YYYYMMDDHHmmssCompact datetime20250115143045
YYYY-MMYear and month2025-01
YYYYYear only2025
DD MMM YYYYDay Month Year (abbreviated)15 Jan 2025
MMM DD, YYYYMonth Day, YearJan 15, 2025
DD MMMM YYYYDay Month Year (full)15 January 2025
MMMM DD, YYYYMonth Day, Year (full)January 15, 2025
ISOISO 8601 format2025-01-15T14:30:45Z
timestampUnix timestamp (milliseconds)1705327845000
timestamp_sUnix 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

OutputTypeDescription
OutputTextThe current datetime formatted according to the specified format and timezone.
DoneEventFires 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.