Date and Time Functions

This section contains the reference documentation for the Date and Time functions built into Splice Machine SQL:

Function Name Description
ADD_MONTHS Returns the date resulting from adding a number of months added to a specified date.
CURRENT_DATE Returns the current date.
CURRENT_TIME Returns the current time;
CURRENT_TIMESTAMP Returns the current timestamp;
DATE Returns a date from a value.
DAY Returns the day part of a value.
EXTRACT Extracts various date and time components from a date expression.
HOUR Returns the hour part of a value.
LAST_DAY Returns the date of the last day of the specified month.
MINUTE Returns the minute part of a value.
MONTH Returns the numeric month part of a value.
MONTH_BETWEEN Returns the number of months between two dates.
MONTHNAME Returns the string month part of a value.
NEXT_DAY Returns the date of the next specified day of the week after a specified date.
NOW Returns the current date and time as a timestamp value.
QUARTER Returns the quarter number (1-4) from a date expression.
SECOND Returns the seconds part of a value.
TIME Returns a time from a value.
TIMESTAMP Returns a timestamp from a value or a pair of values.
TIMESTAMPADD Adds the value of an interval to a timestamp value and returns the sum as a new timestamp
TIMESTAMPDIFF Finds the difference between two timestamps, in terms of the specfied interval.
TO_CHAR This conversion function formats a date value into a string.
TO_DATE This conversion function formats a date string according to a formatting specification, and returns a date value.
TRUNC or TRUNCATE This numeric function truncates numeric, date, and timestamp values.
WEEK Returns the year part of a value.
YEAR Returns the year part of a value.