note 17825 added to function.date
| From: | mathieu at coworsk dot net | Date: | Thu, 27 Dec 2001 11:06:38 +0000 |
| Subject: | note 17825 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23871@lists.php.net to get a copy of this message | ||
Hi, I also have a belgian website and the timesettings I used (for example in my guestbook) are:
$date = gmdate('d/m/Y');
print("$date");
this returns a date of format: 27/12/2001.
But I use it in combination with a MySQL database so when I insert a date in the db I must use
gmdate('Y/m/d'), as this is the format for a MySQL date field. To get the date from the
database back to the browser in the correct form I use the date_format([date], [format]) function of
MySQL.
--
http://www.php.net/manual/en/function.date.php
http://master.php.net/manage/user-notes.php?action=edit+17825
http://master.php.net/manage/user-notes.php?action=delete+17825
http://master.php.net/manage/user-notes.php?action=reject+17825