【问题标题】:Mysql Unix-Timestamp Date FormatMysql Unix-时间戳日期格式
【发布时间】:2012-01-03 15:59:19
【问题描述】:

在 mysql 数据库中,我将日期列存储为 unix-timestamp 格式(例如:1264105904)。我想在 select 语句中将此日期转换为日期时间,例如 "Oct 11, 2011 6:25 am PDT"。我怎样才能做到这一点?

【问题讨论】:

    标签: mysql datetime unix-timestamp


    【解决方案1】:
    select date_format(from_unixtime(1264105904),'%b %d, %Y %l:%i %p PDT');
    

    应该做你想做的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-08
      • 1970-01-01
      • 2021-09-06
      • 1970-01-01
      • 1970-01-01
      • 2012-03-06
      相关资源
      最近更新 更多