Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What time does it signify?

Tags:

sql

time

mysql

I created a table with one attribute tt and inserted a value into it.

CREATE TABLE tt(tm TIME);
INSERT INTO tt VALUES(2342342);

On executing the select command the result shown is in the form :

234:23:42

What time does this signify ?

like image 654
saplingPro Avatar asked Sep 10 '26 12:09

saplingPro


1 Answers

MySQL retrieves and displays TIME values in HH:MM:SS format or HHH:MM:SS format for large hour values. The reason why it can have large values is because it can also represent an interval between two events (which may span over multiple days for example, or even be negative).

H stands for hour, M for minute, and S for second.

So, when you insert 2342342 it becomes 234:23:42 representing 234 hours, 23 minutes, and 42 seconds.

Reference

like image 144
Eric Hotinger Avatar answered Sep 13 '26 02:09

Eric Hotinger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!