Re: Retrieving a date from Oracle. Please help!

From: Date: Thu, 23 May 2002 18:09:22 +0000
Subject: Re: Retrieving a date from Oracle. Please help!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19403@lists.php.net to get a copy of this message
Hi, ALTER SESSION SET NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS" bye, maxim wrote:
Hi all! The problem is I can't get expected datetime value from SELECT query on Oracle table that has a field of type DATE. Seems like datetime looses its time part. The code is like as follows: ... $sql = "select * from A_TABLE"; ora_parse($curs, $sql); ora_exec($curs); ... ora_fetch_into($cursor, $r, ORA_FETCHINTO_NULLS); foreach ($r as $key => $value) {
    print "$key => $value <br>\n";
} ... This displays date part only. May be special PHP or Oracle ini parameters or environment vars required? Any help appreciated. -------------------------------- Best regards, Maxim Bubnov, Software Engineer, Stelt Telecom NN
-- -- -------------------------------------- E-mail: Michael.Bretterklieber@jawa.at ---------------------------- JAWA Management Software GmbH Liebenauer Hauptstr. 200 A-8041 GRAZ Tel: ++43-(0)316-403274-12 Fax: ++43-(0)316-403274-10 GSM: ++43-(0)676-93 96 698 homepage: http://www.jawa.at --------- privat ----------- E-mail: mbretter@inode.at homepage: http://www.inode.at/mbretter --------------------------------------

« previous php.db (#19403) next »