EN
MySQL - what is the difference between DATETIME and TIMESTAMP?
1
answers
6
points
Both DATETIME
and TIMESTAMP
contain the date and time parts, so can you tell me what's the difference between them?
1 answer
6
points
There are several differences between DATETIME
and TIMESTAMP
types.
1. Range:
DATETIME
supported range is from '1000-01-01 00:00:00
' to '9999-12-31 23:59:59
',TIMESTAMP
supported range is from '1970-01-01 00:00:01
' UTC to '2038-01-19 03:14:07
' UTC.
2. Usage:
TIMESTAMP
is generally used to track changes to records, and is often updated every time the record is changed,DATETIME
is generally used to store a specific value.
Note:
Go to the docummentation to read more about
DATETIME
andTIMESTAMP
types. - Link.
0 comments
Add comment