RE: [PHP-DB] Oracle date conversion

From: Date: Fri, 11 Jan 2002 23:54:20 +0000
Subject: RE: [PHP-DB] Oracle date conversion
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15691@lists.php.net to get a copy of this message
> Thanks for your response. When I use SQL*Plus, I get full > date+time. I also get a full datetime from cx_Oracle (a > Python module). Is this then a default _PHP_ behavior when > querying an Oracle db? Why not return the full info? > Ordinarily, I would not complain about the small rewrite you > suggest, but my application is an SQL query window in the > browser, aimed at users who are not SQL enthusiasts. > Another option is to alter your NLS_DATE by setting it in init.ora (proabably not a good idea) or using "ALTER SESSION" which while not ideal would certainly stop you having to rewrite the query. As David pointed out though, using TO_CHAR and it's mate TO_DATE is by far the best way to go. Cheers, Graeme

« previous php.db (#15691) next »