Convert Date to Unix Timestamp

Converts an ISO format date into a Unix timestamp (the number of seconds since 1 January 1970). Use it when another system or calculation expects a timestamp rather than a readable date.

Converts an ISO format date into a Unix timestamp (the number of seconds since 1 January 1970). Use it when another system or calculation expects a timestamp rather than a readable date.

What it does

  • Takes a date in ISO format, with or without a timezone, and returns the equivalent Unix timestamp.
  • Accepts an optional timezone (in NodaTime format, such as EST or America/New_York) for when the input date has none.

Inputs

NameTypeRequiredDescription
DateString-text representing date in ISO format
TimezoneString-NODA format timezone such as EST or America/New_York

Outputs

NameTypeDescription
SuccessBooleanWhether successfully converted the date to timestamp
TimestampNumberunix timestamp such as 1707886809

Notes

  • Example: 2024-02-13T22:00:09-07:00 becomes 1707886809.