开发者

I am trying to convert a date/time string in PHP

I am开发者_Go百科 trying to convert a date/time string in this format

YYYY/MM/DD/HH:MM:SS

to a format that is recognized in PHP


if it's exactly that, just do strtotime(substr($mydate,0,10)." ".substr($mydate,-8)) which converts it to "YYYY/MM/DD HH:MM:SS", which PHP does parse correctly.

It's the middle slash which is probably the issue, in other words.


PHP can parse that string: strptime($time, '%Y/%m/%d/%H:%M:%S')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜