如何将日期和时间转换为另一种数据时间格式


how to convert date and time to another data time format

我想在PHP中将我的日期转换为另一种格式。我实际上不知道语法。这是我的约会对象。

$date = "24-Feb-2013 11:35 AM"

这是我的格式"March 10, 2001, 5:16 pm";

试试这个:

<?php
$date = "24-Feb-2013 11:35 AM";
echo date("Y-m-d H:i:s", strtotime($date));
?>

try this

$date = "24-Feb-2013 11:35 AM";
$timestamp = strtotime($date);

阅读更多