note 79738 deleted from function.date by felipe
| From: | felipe@php.net | Date: | Sat, 15 Dec 2007 15:36:07 +0000 |
| Subject: | note 79738 deleted from function.date by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133580@lists.php.net to get a copy of this message | ||
Note Submitter: maeve k at cinci dot- rr
----
Change a date like
"03-14-2007" to a
format like:
"2007-03-14" for storing in the database:
$value = date('Y-m-d',strtotime(str_replace('-','/',$value)));
The replacement of the "/" seems to be necessary
before you apply the date formatting.