0
$date = "2015 05 06 00:00:00";

I need to display like Wednesday, May 6th, 2015. Here's what I have tried so far:

echo $endDateValue=date('l, F jS, Y',strtotime($date . "+1 days"));
TigerhawkT3
  • 48,464
  • 6
  • 60
  • 97
  • As you have spaces between Y and m and between m and d, you''ll need to let PHP know what your format is: `$endDateValue = DateTime::createFromFormat('Y m d H:i:s', $date); echo $endDateValue->format('l, F jS, Y');` – Mark Baker May 05 '15 at 10:13
  • read manual http://php.net/manual/en/function.date.php – Saty May 05 '15 at 10:13

1 Answers1

0

Use this code

   <?php
    $date = strtotime("2015 05 06 00:00:00");



    echo $endDateValue=date('l, F jS, Y',strtotime($date . "+1 days"));
    ?>
sanir ranta
  • 291
  • 2
  • 7