| Function | Type | What it does |
|---|---|---|
add_months | Scalar | Adds signed calendar months and clamps to month end. |
convert_timezone | Scalar | Converts a timestamp to another time zone or converts a local time between time zones. |
curdate | Scalar | Returns the current date in the session timezone, falling back to UTC. |
current_date | Scalar | Returns the current date in the session timezone, falling back to UTC. |
current_timestamp | Scalar | Returns the query-start timestamp with microsecond precision. |
current_timezone | Scalar | Returns the session timezone string, using UTC when unset. |
date | Scalar | Converts a value to DATE, with the same behavior as CAST(value AS DATE). |
date_add | Scalar | Adds calendar days or specified temporal units. |
date_diff | Scalar | Returns local date boundaries with two arguments or complete elapsed units with three arguments. |
date_format | Scalar | Formats a date or timestamp as a string. |
date_part | Scalar | Extracts a requested temporal component. |
date_sub | Scalar | Subtracts a signed number of days from a date. |
date_trunc | Scalar | Truncates a timestamp to a chosen granularity. |
dateadd | Scalar | Adds a specified number of units to a date or timestamp. |
datediff | Scalar | Returns local date boundaries with two arguments or complete elapsed units with three arguments. |
datepart | Scalar | Extracts a requested temporal component. |
datetime | Scalar | Sets a timestamp’s time zone without changing the instant it represents. |
day | Scalar | Extracts the day-of-month component. |
dayname | Scalar | Returns the three-letter English weekday name. |
dayofweek | Scalar | Extracts the Sunday-based weekday number from a date or timestamp. |
dayofweekiso | Being confirmed | Previous docs; being confirmed. |
days | Scalar | Extracts the day-of-month component. |
extract | Scalar | Extracts an applicable calendar or clock component from a temporal value. |
format_date | Scalar | Formats a date as a string. |
format_timestamp | Scalar | Formats a timestamp as a string. |
from_unixtime | Scalar | Converts epoch seconds to a UTC timestamp or formatted string. |
from_unixtime_withunit | Scalar | Converts an epoch value in seconds or milliseconds to a UTC timestamp. |
from_utc_timestamp | Scalar | Converts UTC wall time to the requested local wall time. |
generate_date_array | Scalar | Generates an inclusive stepped array of dates. |
generate_timestamp_array | Scalar | Generates an inclusive stepped array of timestamps. |
getdate | Scalar | Returns the query-start timestamp with microsecond precision. |
getutcdate | Scalar | Returns the current UTC date. |
hour | Scalar | Extracts the hour component. |
last_day | Scalar | Returns the last calendar date of the input month. |
last_day_of_month | Scalar | Returns the last calendar date of the input month. |
make_date | Scalar | Constructs a date from year, month and day. |
make_time | Scalar | Constructs a time with fractional-second precision. |
make_timestamp | Scalar | Constructs a UTC timestamp from calendar and time components. |
minute | Scalar | Extracts the minute component. |
month | Scalar | Extracts the month component. |
monthname | Scalar | Returns the three-letter English month name. |
months_between | Scalar | Returns a signed fractional month difference, first minus second. |
next_day | Scalar | Returns the next matching weekday strictly after the input date. |
now | Scalar | Returns the query-start timestamp with microsecond precision. |
parse | Being confirmed | Previous docs; being confirmed. |
parse_date | Being confirmed | Previous docs; being confirmed. |
parse_datetime | Being confirmed | Previous docs; being confirmed. |
parse_timestamp | Scalar | Parses a formatted timestamp string and returns a UTC timestamp. |
quarter | Scalar | Extracts the calendar quarter from a date or timestamp. |
second | Scalar | Extracts the second component. |
timestamp | Scalar | Constructs a UTC timestamp from string, date or timestamp input. |
timestamp_add | Scalar | Adds a signed duration or calendar interval to a timestamp. |
timestamp_diff | Scalar | Returns complete elapsed units from start to end. |
timestamp_micros | Scalar | Converts Unix epoch microseconds to a UTC timestamp. |
timestamp_millis | Scalar | Converts Unix epoch milliseconds to a UTC timestamp. |
timestamp_seconds | Scalar | Converts Unix epoch seconds to a UTC timestamp. |
timestampadd | Scalar | Adds a signed duration or calendar interval to a timestamp. |
timestampdiff | Scalar | Returns complete elapsed units from start to end. |
to_char | Scalar | Formats a temporal, numeric, binary or string value as text. |
to_date | Scalar | Converts a value to a date. |
to_time | Scalar | Converts time text to a TIME value using a Spark-style format supplied for each row. |
to_timestamp | Scalar | Converts a value to a timezone-bearing timestamp. |
to_timestamp_ntz | Scalar | Converts a value to a timezone-free timestamp. |
to_timestamp_tz | Scalar | Converts a value to a timezone-bearing timestamp. |
to_unix_timestamp | Scalar | Returns epoch seconds from a timestamp or explicitly formatted string. |
to_unixtime | Scalar | Returns the number of seconds since the Unix epoch for a timestamp. |
to_utc_timestamp | Scalar | Converts local wall time in a timezone to UTC wall time. |
to_varchar | Scalar | Formats a temporal, numeric, binary or string value as text. |
trunc | Scalar | Truncates a date or timestamp to the specified unit and returns a DATE. |
try_to_date | Scalar | Converts a date representation, returning NULL on parse failure. |
try_to_timestamp | Scalar | Parses a value as a timestamp without a timezone, returning NULL on a failed supported conversion. |
try_to_timestamp_ntz | Scalar | Parses a value as a timestamp without a timezone, returning NULL on a failed supported conversion. |
unix_timestamp | Scalar | Returns epoch seconds from a timestamp or explicitly formatted string. |
week | Being confirmed | Previous docs; being confirmed. |
weekday | Scalar | Returns the weekday number with Monday numbered zero. |
weekiso | Being confirmed | Previous docs; being confirmed. |
weekofyear | Scalar | Extracts the ISO 8601 week number component. |
year | Scalar | Extracts the year component. |
Date and time functions
Build, convert, format, extract from and do arithmetic on dates, times and timestamps.
Build, convert, format, extract from and do arithmetic on dates, times and timestamps.
Last modified on October 15, 2026