How to convert decimal(16,4) to DATE or DATETIME in SQL or PHP

后端 未结 3 2001
野趣味
野趣味 2021-01-15 00:18

I have a small problem with a field of my db... the submit time is in decimal(16,4) type and I need to convert it to DATE or DATETIME... but I dont get it...

One exa

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-15 00:46

    Before going to insert the decimal u have to convert those decimal values into date format using this statements, echo strtotime(date('Y-m-d H:i:s',1334041225.5900));

提交回复
热议问题