0

I have some difficults with PHP Date. I need to change date format from mm-dd-yyyy to yyyy-mm-dd For example I have date like '12/11/15' and I need to convert it to '2015-12-11'

I've tried smthn like this

$date = "12/11/15";
$new_date = date("Y-m-d", strtotime($date))

but it doesn't works for me. Could you help me?

Ivar
  • 6,138
  • 12
  • 49
  • 61
Donnie
  • 373
  • 2
  • 7
  • 28

0 Answers0