平成30/ 2018-10-20 06:05
MYSQL/ TIMESTAMP, DATE /2016.5.2

----------------------------------------------------------------------------------------------------------------------
TIMESTAMP(秒)から日付を求めたいとき
-
mysql> SELECT FROM_UNIXTIME(1462127925);
+---------------------------+
| FROM_UNIXTIME(1462127925) |
+---------------------------+
| 2016-05-02 03:38:45       |
+---------------------------+
1 row in set (0.00 sec)

(Thanks.)
12.7 日付および時間関数
https://dev.mysql.com/doc/refman/5.6/ja/date-and-time-functions.html


----------------------------------------------------------------------------------------------------------------------
select timestamp('2012-08-17 12:00:00')
2012-08-17 12:00:00


----------------------------------------------------------------------------------------------------------------------
秒が無いときは0で埋めてくれる。
select timestamp('2012-08-17 12:00')
2012-08-17 12:00:00


----------------------------------------------------------------------------------------------------------------------
select date('2012-08-17 12:00:00')
2012-08-17