Ninjakreborn Posted December 8, 2011 Share Posted December 8, 2011 What is the proper way to turn a date that is in "m/d/Y" format, into a correct timestamp. When I try strtotime, then try to change it back to a date, it shows up incorrectly (defaulting to the 1969 date that it does when it messes up. I just need to be able to turn $date = '10/15/2011'; to and from a timestamp correctly. Any advice? Quote Link to comment https://forums.phpfreaks.com/topic/252787-timestamp-mdy/ Share on other sites More sharing options...
Pikachu2000 Posted December 8, 2011 Share Posted December 8, 2011 There is a link to the formats accepted by strtotime() on the manual page. Quote Link to comment https://forums.phpfreaks.com/topic/252787-timestamp-mdy/#findComment-1295994 Share on other sites More sharing options...
mikesta707 Posted December 9, 2011 Share Posted December 9, 2011 m/d/y is an acceptable format (just did a simple test on my local host). Can we see the code that is giving you problems? Quote Link to comment https://forums.phpfreaks.com/topic/252787-timestamp-mdy/#findComment-1296070 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.