dongzaotiao2863 2016-01-07 14:47
浏览 34

php 5中的日期格式转换[重复]

This question already has an answer here:

I want to convert D, d.m.y to Y-m-d format i.e

echo $from_date=date('Y-m-d', strtotime(Wed, 09.12.15));

But this give me this result 2016-01-13

https://app.absence.io/#/calendar/absence/new check this link, i want to send the from date in 2016-01-01 format to the database

</div>
  • 写回答

4条回答 默认 最新

  • douhushen3241 2016-01-07 14:50
    关注

    First of all, ensure that your date string is enclosed in quotations (" or ').

    Secondly, "Wed, 09.12.15" is not a valid date format that can be understood by strtotime().

    The full list of date formats is listed here.

    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能