-1

I have a string :

$Value = 03/25/2014 10:15 AM

I would like to convert this to a mysql timestamp. When I use date('Y-m-d H:i:s', $Value) it does not work. Can someone please help me convert this? Thank you.

user982853
  • 2,470
  • 14
  • 55
  • 82
  • possible duplicate of [Convert one date format into another in PHP](http://stackoverflow.com/questions/2167916/convert-one-date-format-into-another-in-php) – John Conde Mar 25 '14 at 15:55

1 Answers1

1

date needs a UNIX timestamp:

$Date = date('Y-m-d H:i:s', strtotime($Value));
AbraCadaver
  • 78,200
  • 7
  • 66
  • 87