2011-02-18 02:21
浏览 22


Okay so is there a way to set a date that can be easily modified to a different format later on. Example: A date is in a mysql database, and it is in a universal format; it gets put into a document, is there a way for the date format to be changed on-the-fly?

图片转代码服务由CSDN问答提供 功能建议

好的,有一种方法可以设置一个日期,以后可以很容易地将其修改为不同的格式。 示例:日期位于mysql数据库中,它采用通用格式; 它被放入文档中,有没有办法在运行中更改日期格式?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • dptt66700 2011-02-18 02:26

    Yes, it's called a unix timestamp, which represents seconds since epoch (December 31rst, 1969).

    With timestamps, you can use the date() function to output the date in any format you wish.

    解决 无用
    打赏 举报
  • 查看更多回答(2条)

相关推荐 更多相似问题