swingking Posted December 4, 2006 Share Posted December 4, 2006 is there a simple way to convert...12/4/2006 7:32:48 PMinto2006-12-04 19:32:48 ??thanks! Link to comment https://forums.phpfreaks.com/topic/29405-datetime-conversion/ Share on other sites More sharing options...
Darkness Soul Posted December 4, 2006 Share Posted December 4, 2006 Yo,The fast/only way I think is using truncate.. date won't recognize the first format, so, you can't use date(); to convert directly.. truncate space, truncate '/' and ':', regroup the array values as you wish..:)D.Soul Link to comment https://forums.phpfreaks.com/topic/29405-datetime-conversion/#findComment-134920 Share on other sites More sharing options...
Zane Posted December 4, 2006 Share Posted December 4, 2006 [code=php:0]date("Y-m-d H:i:s", strtotime("12/4/2006 7:32:48 PM"));[/code] Link to comment https://forums.phpfreaks.com/topic/29405-datetime-conversion/#findComment-134923 Share on other sites More sharing options...
Darkness Soul Posted December 6, 2006 Share Posted December 6, 2006 Wow, :DThis may also useful to me!D.Soul Link to comment https://forums.phpfreaks.com/topic/29405-datetime-conversion/#findComment-136082 Share on other sites More sharing options...
swingking Posted December 7, 2006 Author Share Posted December 7, 2006 sweet! thanks! Link to comment https://forums.phpfreaks.com/topic/29405-datetime-conversion/#findComment-137129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.