timestamp
To convert a given time-related value to a timestamp
With this function, you will convert a time-related value to a UTC-based timestamp. If you use a value without time, time is automatically set to 00:00 (+ your respective time zone).
If the value is a number, it represents the Unix time in milliseconds.
Syntax
timestamp(any)
Return
timestamp
Examples
Your result format may be different depending on your settings.
Result:
12/31/2021 23:59 (US)
31/12/2021 23:59 (UK)
(on December 31, 2021, at 23:59 in Berlin – Germany (CET))
Result: 1640991540000 (instead of 1640991540010 as above) (with 'Date + Time' being
12/31/2021 23:59 (US)
31/12/2021 23:59 (UK)
on December 31, 2021at 23:59 in Berlin – Germany (CET))
The timestamp differs because of rounding (see the last 2 digits). The field Date + Time sets the milliseconds equal to 0.
Result:
07/02/2021 11:15 AM (US)
02/07/2021 11:15 (UK)
on July 2, 2021, 11:15 AM in Berlin – Germany (CET), i.e., your current time at the moment when you execute the formula.
See also
datetime
, which converts to or returns a local timestamp.
Last updated