Timestamp functions return a date-time value based on a specified timestamp/interval. Oxla supports the following Timestamp functions:

FunctionsDescription
CURRENT_TIMESTAMP()Returns the current date and time as a timestamp data type.
FORMAT_TIMESTAMP()Modifies the current timestamp into a different format.
UNIX_SECONDS()Converts a given timestamp to a UNIX timestamp in seconds.
UNIX_MILLIS()Converts a given timestamp to a UNIX timestamp in milliseconds.
UNIX_MICROS()Converts a given timestamp to a UNIX timestamp in microseconds.
TIMESTAMP_SECONDS()Converts a UNIX timestamp in seconds to a timestamp.
TIMESTAMP_MILLIS()Converts a UNIX timestamp in milliseconds to a timestamp.
TIMESTAMP_MICROS()Converts a UNIX timestamp in microseconds to a timestamp.
TIMESTAMP_TRUNC()Truncates a given timestamp to the nearest time part. Supported time parts are YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND
EXTRACT()Extracts some part of a specified timestamp or interval.
TO_TIMESTAMP()Converts a string into a timestamp based on the provided format.
DATE_TRUNC()Truncates intervals or timestamps/time zones to a specified field.
TO_CHAR() from TimestampFormats a timestamp into a string using a given format.