to unix seconds
This block is part of the date group and was last modified in core v15.0.0.
to unix seconds v15.0.0 Converts a date, date string, or epoch timestamp to a Unix timestamp in SECONDS : the unit the platform's date fields store. Numbers (and numeric strings) are detected by size: values of 100000000000 (11 digits, March 1973) and above are read as milliseconds and divided, smaller values pass through as seconds; fractional seconds are floored. Pre-1973 millisecond values are outside the detection range : convert those by hand. Anything non-numeric is parsed like every other date pin, in the entity timezone.
- date required
dateA date object, date string, or epoch timestamp in seconds or milliseconds.
- unix seconds
numberThe Unix timestamp in seconds. 0 when the input could not be read as a date.
- valid
conditionFalse when the input was empty, zero, or unparseable : branch on this rather than trusting a 0.
unix timestamp |
epoch seconds |
milliseconds to seconds |
normalize timestamp |
A typical wiring for to unix seconds: date now feeds the date pin; the number out pin feeds cast to value.
Version history
Introduced in v15.0.0.
Back to
date Return to the main group to view all sub-groups Back to date Return to the group to view all blocks within this group 