Re: DB Date and Times
| From: | Michael Bretterklieber | Date: | Tue, 13 Apr 2004 09:55:03 +0000 |
| Subject: | Re: DB Date and Times | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27542@lists.php.net to get a copy of this message | ||
Hi,
Bertrand Mansion schrieb:
A question about dates and times in different DBs... I have taken the habit to use a unix epoch timestamp in my tables instead of the date functions of the various RDBMS (DATE_FORMAT, TO_CHAR...). I chose this solution because I found that PHP had a good handling of unix timestamps (they are usable in almost every date and times functions) and I have had to migrate an app from MySQL to Oracle and all the problems I had came from dates mostly. I'm always using the ISO format for storing date/time values into native date/time datatypes. This format is accepted by MySQL, MSSQL and also by Oracle, if this statement was executed:'ALTER SESSION SET NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"' bye, -- ------------------------------- ---------------------------------- Michael Bretterklieber - http://www.bretterklieber.com A-Quadrat Automation GmbH - http://www.a-quadrat.at Tel: ++43-(0)3172-41679 - GSM: ++43-(0)699 12861847 ------------------------------- ---------------------------------- "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972