How can we know about the starting range of TIMESTAMP data type with the help of MySQL FROM_UNIXTIME() function?

MySQLMySQLi Database

As we know that this function converts a number of seconds into TIMESTAMP value. So by providing 0 seconds as the argument, it will give us the starting range of TIMESTAMP data type.

mysql> Select FROM_UNIXTIME(0);
+-------------------------+
| FROM_UNIXTIME(0)        |
+-------------------------+
| 1970-01-01 05:30:00     |
+-------------------------+
1 row in set (0.00 sec)

Now if we will change the argument from 0 to 60 seconds then the time will be changed by 01 minutes.

mysql> Select FROM_UNIXTIME(60);
+-------------------------+
| FROM_UNIXTIME(60)       |
+-------------------------+
| 1970-01-01 05:31:00     |
+-------------------------+
1 row in set (0.00 sec)
raja
Published on 19-Feb-2018 07:05:24
Advertisements