from_nanoseconds
Aliases: timestamp_ns, nanoseconds (deprecated).
from_nanoseconds(number: numeric) -> timestamp
Builds a timestamp from a numeric value interpreted as nanoseconds since the Unix epoch. Integer values are taken as the timestamp’s internal representation; float64 values are rounded to the nearest integer nanosecond and must lie within the representable range. A null input becomes null timestamp. This function is also exposed as timestamp_ns. For the inverse numeric view of an instant, int64 on a timestamp yields epoch nanoseconds.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col ts:from_nanoseconds(1609459200000000000)
Shows from_nanoseconds constructing a timestamp when the source system already stores instants as epoch nanoseconds.
Updated 1 day ago