I need change to July 25,2017 time to 2017-25-07T08:00:00+08:00
$mysqldate = date( 'Y-m-d H:i:s' );
Result: 2017-25-07T08:00:00+08:00
//this format will be show result
I need change to July 25,2017 time to 2017-25-07T08:00:00+08:00
$mysqldate = date( 'Y-m-d H:i:s' );
Result: 2017-25-07T08:00:00+08:00
//this format will be show result
You can change date into every format,
For Month day,year (July 25,2017) Use
<?php
$mysqldate = date( 'Y-m-d H:i:s' );
$newdate=date('F d,Y',strtotime($mysqldate));
echo $newdate;
?>
For Short Month name (Jul 25,2017) use
<?php
$mysqldate = date( 'Y-m-d H:i:s' );
$newdate=date('m d,Y',strtotime($mysqldate));
echo $newdate;
?>
for more visit http://php.net/manual/en/function.date.php