dtdetu Posted December 6, 2008 Share Posted December 6, 2008 hello how can i reverse this format date Fri, 05 Dec 2008 19:52:27 to the format which i get with time() function like 19231357583 thanks Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/ Share on other sites More sharing options...
Mchl Posted December 6, 2008 Share Posted December 6, 2008 strtotime Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707522 Share on other sites More sharing options...
redarrow Posted December 6, 2008 Share Posted December 6, 2008 <?php echo strtotime("Fri, 05 Dec 2008 19:52:27"); ?> result 1228506747 how to format the date using strtotime...... example <?php $date=strtotime("Fri, 05 Dec 2008 19:52:27"); $date_formatted=date("d-m-y h:i:s",$date); echo $date_formatted; ?> Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707524 Share on other sites More sharing options...
dtdetu Posted December 6, 2008 Author Share Posted December 6, 2008 thank you very much and can you also tell me the value of 12 hours ago from now.thanks again Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707526 Share on other sites More sharing options...
Mchl Posted December 6, 2008 Share Posted December 6, 2008 strtotime("-12 hours") Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707528 Share on other sites More sharing options...
dtdetu Posted December 6, 2008 Author Share Posted December 6, 2008 thanks guys you are very fast you cant find this service anywhere we should donate to phpfreaks. thanks all Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707529 Share on other sites More sharing options...
Mchl Posted December 6, 2008 Share Posted December 6, 2008 we should donate to phpfreaks. By all means do Take care Quote Link to comment https://forums.phpfreaks.com/topic/135780-solved-date-help/#findComment-707532 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.