Converting a date string which is before 1970 into a timestamp in MySQL

后端 未结 8 1705
名媛妹妹
名媛妹妹 2020-12-17 14:51

Not a very good title, so my apologies.

For some reason, (I wasn\'t the person who did it, i digress) we have a table structure where the field type for a date is va

8条回答
  •  时光取名叫无心
    2020-12-17 15:22

    I have not tried the above solutions but this might in case you are not able to retrieve the date value from the MySQL database in the form of timestamp, then this operation can also be tried

    SELECT TIMESTAMPDIFF(second,FROM_UNIXTIME(0),'1960-01-01 00:00:00');

提交回复
热议问题