johnsmith153 Posted December 1, 2008 Share Posted December 1, 2008 This must be easy, and i can do it the other way around easily. How would I convert text date (03/07/2009) into the time(); value ? I use date as dd-mm-yyyy Quote Link to comment https://forums.phpfreaks.com/topic/135017-convert-03072009-into-time/ Share on other sites More sharing options...
Maq Posted December 1, 2008 Share Posted December 1, 2008 strtotime? Quote Link to comment https://forums.phpfreaks.com/topic/135017-convert-03072009-into-time/#findComment-703199 Share on other sites More sharing options...
gevans Posted December 1, 2008 Share Posted December 1, 2008 if you want to just change dd/mm/yyyy to dd-mm-yyyy you can just use str_replace() Quote Link to comment https://forums.phpfreaks.com/topic/135017-convert-03072009-into-time/#findComment-703204 Share on other sites More sharing options...
Maq Posted December 1, 2008 Share Posted December 1, 2008 Sorry, thought you wanted unix timestamp. If you want dd/mm/yyyy to dd-mm-yyyy use: $your_date = "03/07/2009"; echo date('m-d-Y', $your_date); Quote Link to comment https://forums.phpfreaks.com/topic/135017-convert-03072009-into-time/#findComment-703214 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.