Re: date to string
| From: | Chris | Date: | Fri, 02 Feb 2007 00:44:36 +0000 |
| Subject: | Re: date to string | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248180@lists.php.net to get a copy of this message | ||
John Taylor-Johnston wrote:
Chris wrote:Seems to work ;) $ php -a <?php Interactive mode enabled echo date("l, F j, Y", strtotime("2007-02-01")); Thursday, February 1, 2007 Just noticed your original message said about turning 2007-02-01 into 2006 :P heh. -- Postgresql & php tutorials http://www.designmagick.com/John Taylor-Johnston wrote:echo date("l, F j, Y", strtotime("2007-02-01")); That's it?How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?Use strtotime (http://php.net/strtotime) to turn it into a timestamp and then format it using date (http://php.net/date).