blake87 Posted September 18, 2008 Share Posted September 18, 2008 How can I convert this time date format "2008-09-03 10:59:03" to this type of time date format "01182494270", is it possible, hopefully there’s a method which can achieve this easily, could someone explain the latter format as well if possible thanks in advance Link to comment https://forums.phpfreaks.com/topic/124794-coverting-time-dates/ Share on other sites More sharing options...
JasonLewis Posted September 18, 2008 Share Posted September 18, 2008 You mean to a Unix Timestamp? Take a look at strtotime() if that is what you are after. Link to comment https://forums.phpfreaks.com/topic/124794-coverting-time-dates/#findComment-644652 Share on other sites More sharing options...
blake87 Posted September 18, 2008 Author Share Posted September 18, 2008 dammn, how did I manage to miss this method, I guess i was looking in the wrong place!, thanks, I think this will help with what im trying to do ill let you know Link to comment https://forums.phpfreaks.com/topic/124794-coverting-time-dates/#findComment-644664 Share on other sites More sharing options...
blake87 Posted September 18, 2008 Author Share Posted September 18, 2008 Solved it worked how it should, I think I did see this method before, I just didnt follow the examples vvery well ie I was trying to use strtotime ( string $time [, int $now ] ) which didnt work for me, got it working now I just used $Ctime = strtotime ($Ctime); Works a treat thanks ProjectFear Link to comment https://forums.phpfreaks.com/topic/124794-coverting-time-dates/#findComment-644690 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.