I have been writing Oracle SQL for many years but I constantly look up Oracle date formats. It is interesting what your brain stores and what it doesn’t. See below for common ones. I hope this helps someone.
|MM||Numeric month (e.g., 07)|
|MON||Abbreviated month name (e.g., JUL)|
|MONTH||Full month name (e.g., JULY)|
|DD||Day of month (e.g., 24)|
|DY||Abbreviated name of day (e.g., FRI)|
|YYYY||4-digit year (e.g., 1998)|
|YY||Last 2 digits of the year (e.g., 98)|
|RR||Similar to YY, but year digits are “rounded” to a year in the range of 1950 to 2049. So, 06 returns 2006 instead of 1906.|
|AM (or PM)||Meridian indicator|
|HH||Hour of day (1-12)|
|HH24||Hour of day (0-23)|
Here are some links with more helpful information about Oracle dates.
One thought on “Oracle Date Formats”
Comments are closed.