DrTrans Posted February 27, 2009 Share Posted February 27, 2009 Sorry guys, I have a Quick question just need some help or a sample... I just need to change a date format etc.. Maybe u can understand what im wanting to do $job->date = 01/22/09 09:00 PM I need this turn aroudn to 20090122 2300 However, I can not go back and edit where i have parsed the date because in my web app i want it to read the correct 01/22/09 09:00 PM. so my thought in perl would be to split the $job->date and rearrange into format i need without the / and correct the 09 with a "20" since we all know for another 1000 years this isnt going to change, and correct the 09 in tiem with a +12 sequence.. If you would gladly post some help or a snippet of code i would appreciate it.. I have hard issues with learning PHP by reading, The only way for me to learn it is to see it done, then i understand it. Thanks Link to comment https://forums.phpfreaks.com/topic/147231-date/ Share on other sites More sharing options...
Mchl Posted February 27, 2009 Share Posted February 27, 2009 $string = "01/22/09 09:00 PM"; $ts = strtotime($string); echo date("Ymd Hi",$ts); Link to comment https://forums.phpfreaks.com/topic/147231-date/#findComment-772905 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.