Home  >  Q&A  >  body text

mysql - 轉換欄位日期為時間戳記

怪我咯怪我咯2764 days ago354

reply all(2)I'll reply

  • 阿神

    阿神2017-04-17 15:44:36

    UPDATE xxx set 欄位 = UNIX_TIMESTAMP(欄位)

    reply
    0
  • 阿神

    阿神2017-04-17 15:44:36

    Reference: http://www.cnblogs.com/Bright...
    Probably use

    SELECT UNIX_TIMESTAMP('2016-01-20 20:09:10')

    reply
    0
  • Cancelreply