SQL function - Part3:SQLFunctions DB2DateFunctions...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Part 3: SQL Functions DB2 Date Functions CURDATE() Returns the current date as a date value. CURTIME() Returns the current local time as a time value. DAYNAME( date_exp ) Returns a character string containing the name of the day (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday ) for the day portion of date_exp . DAYS( date_exp ) Returns an integer representation of a date. (number of days since January 1, 0001) DAYOFMONTH ( date_exp ) Returns the day of the month in date_exp as an integer value in the range of 1-31. DAYOFWEEK( date_exp ) Returns the day of the week in date_exp as an integer value in the range 1-7, where 1 represents Sunday. DAYOFWEEK_ISO( date_exp ) Returns the day of the week in date_exp as an integer value in the range 1-7, where 1 represents Monday. Note the difference between this function and the DAYOFWEEK() function, where 1 represents Sunday. DAYOFYEAR( date_exp ) Returns the day of the year in date_exp as an integer value in the range 1-366. HOUR( time_exp ) Returns the hour in time_exp as an integer value in the range of 0-23. JULIAN_DAY( date_exp ) Returns the number of days between date_exp and January 1, 4712 B.C. (the start of the Julian date calendar). MINUTE(
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

SQL function - Part3:SQLFunctions DB2DateFunctions...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online