Oracle SQL - Select Date Functions

Introduction

The following code lists the most commonly used Oracle date functions.

Function Description
ADD_MONTHS(d, n) Date d plus n months
MONTHS_BETWEEN(d, e) Months between dates d and e
LAST_DAY(d)Last day of the month containing date d
NEXT_DAY(d, weekday) The first weekday (mon, tue, etc.) after d
NEW_TIME(d, z1, z2)Convert date/time from time zone z1 to z2
ROUND(d[, fmt])d rounded on fmt (the default for fmt is midnight)
TRUNC(d[, fmt])d truncated on fmt (the default for fmt is midnight)
EXTRACT(c FROM d) Extract date/time component c from expression d

Related Topics