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 Quote 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 Quote 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. Quote 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); ?> Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/72116-string-to-date/#findComment-363554 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.