Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

Appendix D. Date Formats

This appendix summarizes the date format elements that may be used in a variety of Oracle tools (e.g., SQL*Plus), in the built-in packages, and in format specifications within SQL statements.

Table D-1 lists all date format elements. Table D-2 contains examples illustrating the use of many of these elements.

Table D-1. Date format elements

Formatelement

Function

- / , . ; :

Punctuation to be included in the output.

‘text’

Quoted text to be reproduced in the output.

AD or A.D.

BC or B.C.

AD, A.D., BC, or B.C. indicator included with the date.

AM or A.M.

PM or P.M.

AM, A.M., PM, or P.M. printed, whichever applies.

CC

The century number. This will be 20 for years 1900 through 1999.

SCC

Same as CC, but negative for BC dates.

D

The number of the day of the week—1 through 7.

DAY

The full name of the day.

DD

The day of the month.

DDD

The day of the year.

DY

The abbreviated name of the day.

E

The abbreviated era name. Valid only for Japanese Imperial, ROC Official, and Thai Buddha calendars.

EE

The full era name. See E.

FF

The fractional seconds. Valid only for TIMESTAMP types.

FM

Suppresses extra blanks and zeros in the character string representation of a date. For example, use ‘FMMonth DD’ to get `July 4’ rather than `July 04’.

HH

The hour of the day on a 12-hour clock.

HH12

The hour of the day on a 12-hour clock.

HH24

The hour of the day on a 24-hour clock.

IW

The ISO week number, which can be from 1 to 53. See ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page