Skip to main content

Convert Date/Time to Timestamp

Command description​

Convert a date and time to a timestamp at the specified precision. When Date/Time is omitted, the current system date and time is used.

Command Input Parameters​

input parametersInput parameter typeDescription
Date/Timedatetime or strDate/time value or parseable date/time text, such as 2026-06-20 12:30:00 or 2026/06/20. Uses the current date and time when omitted.
Timestamp PrecisionenumSeconds, Milliseconds, Microseconds

Command Output Parameters​

Output parametersOutput parameter typeDescription
TimestampintConverted timestamp

Supported date and time text formats​

When datetime parameters use text, the following formats are supported:

FormatExample
yyyy-MM-dd HH:mm:ss2026-06-20 12:30:00
yyyy/MM/dd HH:mm:ss2026/06/20 12:30:00
yyyy-MM-dd HH:mm2026-06-20 12:30
yyyy/MM/dd HH:mm2026/06/20 12:30
yyyy-MM-dd2026-06-20
yyyy/MM/dd2026/06/20
ISO format2026-06-20T12:30:00, 2026-06-20T12:30:00.123456, 2026-06-20T12:30:00+08:00

For AI-generated workflows, prefer yyyy-MM-dd HH:mm:ss and avoid unsupported formats such as "June 20, 2026".

AI Workflow Generation Notes​

  • The date and time can be left blank. When left blank, None will be passed at runtime and the current time will be used.
  • The value can be a datetime or parsable date/time text. Timestamp Precision must match the precision used when the timestamp is later parsed.