본문 바로가기
Works/SQL

[MySQL] TIMESTAMP

by Sleepy Uncle.GOM 2020. 5. 16.
SELECT UNIX_TIMESTAMP('YYYY-MM-DD hh:mm:ss')

SELECT FROM_UNIXTIME('[10자리 timestamp 값]','%Y-%m-%d %H:%i:%s')

 

 

예시)

SELECT UNIX_TIMESTAMP('2015-08-20 10:00:00')

▶ 1440090000

 

SELECT FROM_UNIXTIME('1440090000','%Y-%m-%d %H:%i:%s')

▶ 2015-08-20 10:00:00

 

댓글0