note 11377 added to Date and Time functions
| From: | shinelight at excite dot com | Date: | Sun, 18 Feb 2001 20:39:46 +0000 |
| Subject: | note 11377 added to Date and Time functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11223@lists.php.net to get a copy of this message | ||
To use dates and times in ODBC-compliant databases (including MySQL), you can use the timestamp
format: {ts 'yyyy-mm-dd hh:mm:ss'}. {ts '1899-12-30 00:00:00'} is the earliest
date and time that can be inserted into a database using this format. This is perhaps the most
portable and supported syntax out there by most databases (however, a good database will support
several methods for date/time objects). Just a thought...shouldn't there be some type of ODBC
date/time object generation for PHP rather than have us re-invent the wheel every time we write PHP
code? As I said, just a thought.
http://www.php.net/manual/en/ref.datetime.php