By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

What is the difference between time and timestamp data type in MySQL

P: 1
What is the difference between time and timestamp data type in MySQL?
Sep 10 '12 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,349
TIME only stores what would be considered a time interval. TIME values may range from '-838:59:59' to '838:59:59'.

TIMESTAMP stores a date and time. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.
Sep 10 '12 #2

P: 31
Hi! MySQL displays TIMESTAMP values using the same format as DATETIME values; that is, 'YYYY-MM-DD hh:mm:ss'.TIMESTAMP values actually represent the number of seconds elapsed since the beginning of 1970 and are stored using four bytes. and time considered only time interval.
Sep 22 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.