Chapter 4: Storing and Processing Dates and Times


Overview

In this chapter, you will

  • Process and store a specific date and time, collectively known as a datetime . An example of a datetime is 7:15:30 PM on October 10, 2005. You store a datetime using the DATE type. The DATE type stores the century, all four digits of a year, the month, the day, the hour (in 24- hour format), the minute, and the second.

  • Use timestamps , which allow you to store a specific date and time. A timestamp stores the century, all four digits of a year, the month, the day, the hour (in 24-hour format), the minute, and the second. The advantages of a timestamp over a DATE are that a timestamp can store a fractional second, and a timestamp can store a time zone.

  • Use time intervals , which allow you to store a length of time. An example time interval is 1 year 3 months.

Let s plunge in and see some simple examples of storing and retrieving dates using the DATE type.




Oracle Database 10g SQL
Oracle Database 10g SQL (Osborne ORACLE Press Series)
ISBN: 0072229810
EAN: 2147483647
Year: 2004
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net