18. Working with Data Types and Data Display Formats : Data Types : Date Data Type
 
Share this page                  
Date Data Type
Date data type columns hold absolute dates, absolute times, or time intervals. Date data types can contain any valid date between January 1, 1582 and December 31, 2382. When used in database language commands, date data types are enclosed in quotation marks as are text types.
An absolute date is a time, such as 12:30 on November 13. There are many ways of expressing absolute dates and time.
For example, you can express the date December 25, 1998, in any of the following ways:
mm/dd/yy 12/25/98
dd‑mmm‑yyyy 25‑Dec‑1998
mm‑dd‑yyyy 12‑25‑1998
yyyy.mm.dd 1998.12.25
mm/dd 12/25
mm‑dd 12‑25
mmddyy 122598
mm/dd/yy hh:mm:ss ampm 12/25/98 10:30:30 am
You can express the time 10:30 a.m. as:
hh:mm:ss ampm tz 10:30:00 am pst
You can also use now or today to mean the current date and time (now), or current date only (today).
Various conventions for date and time are recognized. For example, it assumes a 24‑hour clock unless you specify p or p.m. The program adjusts dates and times to the designated time zone, such as Pacific Standard Time.
For information on how to specify various date display formats, see Data Display and Input Formats (see page Data Display and Input Formats).