Date and Time Datatypes


MySQL uses special datatypes for the storage of date and time values as listed in Table D.3.

Table D.3. Date and Time Datatypes

Datatype

Description

DATE

Date from 1000-01-01 to 9999-12-31 in the format YYYY-MM-DD.

DATETIME

A combination of DATE and TIME.

TIMESTAMP

Functionally equivalent to DATETIME (but with a smaller range).

TIME

Time in the format HH:MM:SS.

YEAR

A 2 or 4 digit year, 2 digit years support a range of 70 (1970) to 69 (2069), 4 digit years support a range of 1901 to 2155.





MySQL Crash Course
MySQL Crash Course
ISBN: 0672327120
EAN: 2147483647
Year: 2004
Pages: 214
Authors: Ben Forta

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