note 12487 modified in function.ociresult by sixd

From: Date: Thu, 08 Oct 2009 19:31:27 +0000
Subject: note 12487 modified in function.ociresult by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161557@lists.php.net to get a copy of this message
I complained that I couldn't get the time from an Oracle date field. Joe Brown said: 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); --was-- I complained that I couldn't get the time from an Oracle date field. Joe Brown said: 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); http://php.net/manual/en/function.ociresult.php

« previous php.notes (#161557) next »