search

Home  >  Q&A  >  body text

php - How to convert millisecond-level timestamps into standard date display

  1. 1497154554827.0 This time is a timestamp returned by an API, which is a millisecond timestamp

  2. How to convert to timestamp format in mysql

  3. The transfer time on the time conversion website is 2017/6/11 12:15:54

巴扎黑巴扎黑2718 days ago1261

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-12 09:23:17

    Divide by 1000 and use date to convert
    echo date('Y-m-d H:i:s', 1497154554827.0 / 1000);

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-12 09:23:17

    I also tried this method and the result was 2017-06-11 06:15:54. It doesn’t match the poster’s 2017/6/11 12:15:54. I don’t know if the poster wrote it wrong.

    reply
    0
  • Cancelreply