#10350 [Opn]: OCIResult doesn't return time for an Oracle Date field
| From: | maxim@php.net | Date: | Wed, 29 Jan 2003 15:03:31 +0000 |
| Subject: | #10350 [Opn]: OCIResult doesn't return time for an Oracle Date field | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31586@lists.php.net to get a copy of this message | ||
ID: 10350
Updated by: maxim@php.net
Reported By: dwilson@cae.wisc.edu
Status: Open
Bug Type: Feature/Change Request
Operating System: Sun OS 5.7
PHP Version: 4.0.3pl1
-Assigned To:
+Assigned To: maxim
New Comment:
Besides being a little bit bogus, this also has chances to be already
solved meanwhile.
Previous Comments:
------------------------------------------------------------------------
[2001-04-16 17:49:58] cnewbill@php.net
Seeing how it's a feature request, I guess it can't be Bogus or can
it?
-Chris
------------------------------------------------------------------------
[2001-04-16 17:48:13] cnewbill@php.net
Joe Brown says:
This is not a PHP bug.
Consider setting NLS_DATE_FORMAT.
The manual states OCIResult() returns everything as a string.
NLS_DATE_FORMAT may not be appropriate for your needs.
There are quite a few places you can set NLS_DATE_FORMAT.
* Environment variables (or windows registry on win32)
* orclSID.ora
* on a per session basis; execute this statement after logon:
$cursor=OCIParse($connection, "ALTER SESSION SET
NLS_DATE_FORMAT='YYYY-MM-DD
HH24:MI:SS'");
OCIExecute($cursor);
OCIFreeCursor($cursor);
------------------------------------------------------------------------
[2001-04-16 16:07:54] dwilson@cae.wisc.edu
The Oracle Date fields are actually DateTime fields. Your OCIResult
routinue returns the date only.
As this point, you can't change what OCIResult does because you'd break
existing code.
I request that you add a new function allowing the recovery of the time
value of an Orcale Date field.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=10350&edit=1