Re: easy date format question
| From: | Dan Brunner | Date: | Mon, 04 Mar 2002 23:07:23 +0000 |
| Subject: | Re: easy date format question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17459@lists.php.net to get a copy of this message | ||
Hello!!
it should be
$today = Date("Y"-"m"-"d");
Dan
On Friday, March 1, 2002, at 04:50 PM, whyyousee@yahoo.com wrote:
should be simple as pie, of course, but i can't find a straightforward syntax example in the documentation. i'm trying to change the PHP date format to mysql's. my code: $today = date("YYYYMMDD"); $sql = "INSERT into table (date) values ('$today')"; and so on... is filling the date field with zeros, instead of 2002-02-28 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php