How does one convert seconds (or milliseconds) to a timestamp (or just a string that looks like a date) in mySql

后端 未结 4 640
南笙
南笙 2021-01-18 03:35

I\'m looking at this documentation http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_maketime And I KNOW I must be missing it, but I just don\'t s

4条回答
  •  感情败类
    2021-01-18 04:24

    try below

    STR_TO_DATE('Dec/15/2008', '%M/%d/%Y'); => 2008-12-15

    STR_TO_DATE('31/Jan/2008', '%d/%M/%Y'); => 2008-01-31

    STR_TO_DATE( '31/Jan/2008 23:52', '%d/%M/%Y %H:%i' ) => 2008-01-31 23:52:00

提交回复
热议问题