Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.


Ispirer SQLWays Database Migration Software

DATE, TIME, DATETIME, TIMESTAMP and YEAR

DATE

The DATE data type stores the date information (year, month, day). The supported range is January 1, 1000 to December 31, 9999.

TIME

The TIME data type stores the time information (hours, minutes, seconds). The supported range is -838 hours 59 minutes 59 seconds to 838 hours 59 minutes 59 seconds.

DATETIME

The DATETIME data type stores both date and time information (year, month, day, hours, minutes, seconds). The supported range is January 1, 1000 00 hours 00 minutes 00 seconds to December 31, 9999 23 hours 59 minutes 59 seconds.

TIMESTAMP[(p)]

The TIMESTAMP data type stores the date and time information (year, month, day, hours, minutes, seconds). The difference between TIMESTAMP and DATATYPE is that TIMESTAMP column automatically changes its value to the current date and time for the row, which is updated or inserted into the table.

The range is January 1, 1970 00 hours 00 minutes 00 seconds to January 1, 2037 00 hours 00 minutes 00 seconds.

The allowed values of p is 14 (or missing), 12, 8, 6, 4 or 2 (4 or 2 are not allowed in MySQL versions prior to v4.0). The p argument (4 bytes long) affects how a TIMESTAMP column is displayed. The TIMESTAMP(p) columns where p is 8 or 14 are reported to be numbers. The other TIMESTAMP(p) columns are reported to be strings.

YEAR[(2|4)]

The YEAR type is a 1-byte type used for representing years.

A year in 2- or 4-digit format (default is 4-digit). The allowable values are 1901 to 2155, 0000 in the 4-digit year format, and 1970 to 2069 if you use the 2-digit format (70-69). (The YEAR type is not available prior to MySQL Version 3.22.)


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.