SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-4
Datetime Functions
Datetime Functions
These functions use either a datetime value expression as an argument or return a 
result of datetime data type: 
CONVERTTIMESTAMP Function on 
page 9-32
Converts a Julian timestamp to a TIMESTAMP 
value.
CURRENT Function
 on page 9-37 Returns the current timestamp. You can also use 
the CURRENT_TIMESTAMP Function
.
CURRENT_DATE Function
 on 
page 9-38
Returns the current date.
CURRENT_TIME Function
 on 
page 9-39
Returns the current time.
CURRENT_TIMESTAMP Function
 on 
page 9-40
Returns the current timestamp. You can also use 
the CURRENT Function
.
DATEFORMAT Function
 on page 9-42 Formats a datetime value for display purposes.
DAY Function
 on page 9-43 Returns an integer value in the range 1 through 
31 that represents the corresponding day of the 
month. You can also use DAYOFMONTH.
DAYNAME Function
 on page 9-44 Returns the name of the day of the week from a 
date or timestamp expression.
DAYOFMONTH Function
 on page 9-45 Returns an integer value in the range 1 through 
31 that represents the corresponding day of the 
month. You can also use DAY.
DAYOFWEEK Function
 on page 9-46 Returns an integer value in the range 1 through 7 
that represents the corresponding day of the 
week.
DAYOFYEAR Function
 on page 9-47 Returns an integer value in the range 1 through 
366 that represents the corresponding day of the 
year.
EXTRACT Function
 on page 9-62 Returns a specified datetime field from a 
datetime value expression or an interval value 
expression. 
HOUR Function
 on page 9-64 Returns an integer value in the range 0 through 
23 that represents the corresponding hour of the 
day.
JULIANTIMESTAMP Function
 on 
page 9-66
Converts a datetime value to a Julian timestamp.
MINUTE Function
 on page 9-83 Returns an integer value in the range 0 through 
59 that represents the corresponding minute of 
the hour.










