perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: different default oracle date formats under mod_perl and scripts
Date Sat, 26 Aug 2006 02:34:48 GMT
Jay Buffington wrote:
> Hi,
> 
> I'm using DBI with DBD::Oracle.  I've noticed that under scripts the
> default date format is mm/dd/yyyy HH24:MI:SS, where as under mod_perl
> the default returned date format is YYYY-MM-DD.
> 
> That is, if I select a date column from the database without wrapping
> it in a TO_CHAR() function, I get different results under mod_perl.
> 
> I find this curious.  Is this a configuration option somewhere?  If so
> where can I change it?
> 
> Thanks,
> Jay
It is a config option, but I've forgotten which
you can set this way too -- so you don't break EVERYONE else using the DB

$dbh->do("ALTER SESSION SET NLS_DATE_FORMAT = 'yyyy-mm-dd hh24:mi:ss'");



-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /
 / /|_/ / // /\ \/ /_/ / /__
/_/  /_/\_, /___/\___\_\___/
       <___/

Mime
View raw message