Date and time functions
CURRENT_DATE
Returns the current date.CURRENT_TIMESTAMP
Returns the current timestamp.DATE_ADD
Adds days to a date.DATE_SUB
Subtracts days from a date.DATEDIFF
Returns the number of days between two dates.DATE_TRUNC
Truncates a timestamp to a specified precision.year, month, day, hour, minute, second
EXTRACT
Extracts a component from a date or timestamp.YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, DAYOFWEEK, DAYOFYEAR
TO_DATE
Converts a string to a date.TO_TIMESTAMP
Converts a string to a timestamp.FROM_UNIXTIME
Converts Unix epoch seconds to timestamp.UNIX_TIMESTAMP
Converts a timestamp to Unix epoch seconds.FORMAT_TIMESTAMP
Formats a timestamp column using a specified pattern string. Returns the formatted timestamp as a string.YYYY-MM-DD— Date only (2024-01-15)HH24:MI:SS— 24-hour time (14:30:00)YYYY-MM-DDTHH24:MI:SS— ISO 8601 without timezoneYYYY-MM-DDTHH24:MI:SS TZH:TZM— ISO 8601 with full timezone offset

