corkg Posted October 6, 2007 Share Posted October 6, 2007 Hi I have a time as a string: 1191707001 How do i convert this to a date: 2007/10/06 03:12:08 Thanks Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/ Share on other sites More sharing options...
sasa Posted October 6, 2007 Share Posted October 6, 2007 look date() function Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/#findComment-363549 Share on other sites More sharing options...
corkg Posted October 6, 2007 Author Share Posted October 6, 2007 I can't find out how to do it. Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/#findComment-363552 Share on other sites More sharing options...
sasa Posted October 6, 2007 Share Posted October 6, 2007 try <?php $a = '1191707001'; echo date('Y/m/d h:i:s', $a); ?> Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/#findComment-363553 Share on other sites More sharing options...
darkfreaks Posted October 6, 2007 Share Posted October 6, 2007 solved Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/#findComment-363554 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.