sukumar Posted January 8, 2008 Share Posted January 8, 2008 I want to change the format of a date which in this (Tue, 08 Jan 08 18:48:07 +0000) format to this (Tue, 08 Jan 2008 18:46:52 GMT). Can anyone pls tell me how to do that. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/85053-how-to-change-the-format-of-a-date-in-php/ Share on other sites More sharing options...
kenrbnsn Posted January 8, 2008 Share Posted January 8, 2008 You want to use a combination of the strtotime() and date() functions. Ken Quote Link to comment https://forums.phpfreaks.com/topic/85053-how-to-change-the-format-of-a-date-in-php/#findComment-433759 Share on other sites More sharing options...
rhodesa Posted January 8, 2008 Share Posted January 8, 2008 All of the formats for the date function are available at http://php.net/date $time = strtotime("Tue, 08 Jan 08 18:48:07 +0000"); print date("D, d M Y H:i:s T",$time); Quote Link to comment https://forums.phpfreaks.com/topic/85053-how-to-change-the-format-of-a-date-in-php/#findComment-433760 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.