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.