字符串到php时间戳

时间:2010-08-12 10:43:52

标签: php date timestamp

  

可能重复:
  convert any date string to timestamp without timezone

我有一个看起来像这样的字符串,想要一个php时间戳格式。 如有必要,我可以要求客户更改字符串的格式。

2010/08/11 06:33:00

1 个答案:

答案 0 :(得分:0)

使用strtotime:

$date = date('Y/m/d H:i:s', strtotime('2010/08/11 06:33:00'));