IBM DB2

Function NameDescription
CURRENT DATEObtains the current date value.
CURRENT TIMEObtains the current time value in the local time zone.
CURRENT TIMESTAMPObtains the current date and time in the local time zone.
DATE(<expression>)Evaluates the expression and returns a date.
DAY(<expression>)Evaluates the expression and returns the day part of a date, timestamp, or date interval.
DAYOFMONTH(<expression>)Evaluates the expression and returns the day part of a date or timestamp.
DAYOFWEEK(<expression>)Evaluates the expression and returns the day number of the week, where 1 = Sunday.
DAYOFWEEK_ISO(<expression>)Evaluates the expression and returns the day number of the week, where 1 = Monday.
DAYOFYEAR(<expression>)Evaluates the expression and returns ...

Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.