-2

I have searched but I could not find out how to convert a date from a character string. For example string date is 18-08-2016 I want to convert 18 August 2016 How can I do?

David Barbata
  • 303
  • 1
  • 2
  • 12

1 Answers1

1
$input = '18-08-2016';
echo strftime('%d %B %Y',strtotime($input));// 18 August 2016

Use this resource to format the output to your liking.

BeetleJuice
  • 37,029
  • 18
  • 91
  • 152