-2

Possible Duplicate:
Convert this string to datetime

I have to convert my string value into datetime.Is there any php function which can convert varchar value into datatime.my value are coming like this:

$a= "2013-Jan-12-(Sat) 03:30 PM";

and i want to convert it simple datetime. Like: 2013-1-12 15:30:45

Community
  • 1
  • 1
user1523311
  • 145
  • 2
  • 3
  • 16

2 Answers2

0

$Date = new DateTime("13-Jan-12-(Sat) 03:30 PM")

should do the trick. if thats not working, look at strtotime.

dognose
  • 20,360
  • 9
  • 61
  • 107
-1

May be the sat is the problem try to change that or add that at first, you may get it.

Vishnudev
  • 94
  • 2