date to unix_timestamp

4/21/2012 12:18:56 AM

times in this format

how do I translate to unix_timestamp
Who is Participating?

Improve company productivity with a Business Account.Sign Up

becraigConnect With a Mentor Commented:
print strtotime('4/21/2012 12:18:56')
Cornelia YoderConnect With a Mentor ArtistCommented:
strtotime() will convert any date to a unix timestamp.  The function documentation can be found at
Ray PaseurConnect With a Mentor Commented:
Please, please, please read this article (I'm sure we have talked about this before).  It will answer almost all of your questions about handling dates and times in PHP.

One of the things you want to be careful about... Dates written with dashes separating the month, day and year may be interpreted differently from dates written with slashes.  You might want to set up some test cases so you can see the difference.
rgb192Author Commented:
strtotime thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.