SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-10
Date-Time Functions
Date-Time Functions
Date-time functions are functions that you can use in expressions that involve columns
defined with the date-time data types (DATETIME, DATE, TIME, and TIMESTAMP).
You can use the date-time functions anywhere an arithmetic expression is allowed.
NonStop SQL/MP provides these date-time functions:
For information, see the descriptions of specific functions.
Date-Time Literals
A date-time literal is a DATETIME, DATE, TIME, or TIMESTAMP constant that you can
use in an expression, in a statement, or as a parameter value. Date-time literals have
the same range of valid values as the corresponding date-time data types.
CONVERTTIMESTAMP
Function
Converts a Julian timestamp to a DATETIME value
CURRENT Function Returns the current date, current time, or current date and
time
DATEFORMAT
Function
Formats a date-time value
DAYOFWEEK Function Returns an integer representing a day of the week
EXTEND Function Adjusts the range of fields for a date-time value
JULIANTIMESTAMP
Function
Converts a date-time value to a Julian timestamp