From: steve f. <sfi...@pc...> - 2003-02-21 19:09:56
|
arnaud- we have fixed this for now by using the oracle-specific 'sysdate' function. try this: - cd $PROJECT_HOME/GUS/PluginMgr/lib/perl - cvs update (should bring in a new GusApplication.pm) - build GUS install -append - ga +meta --commit steve Jonathan Crabtree wrote: > > steve fischer wrote: > >> >> Jonathan- is there an easy way in perl to get an oracle compatible >> date? >> > > The problem is that you're relying on Oracle's implicit conversion > (from a string > to a DATE type) which will only work if the format of the provided > string matches > the default NLS_DATE_FORMAT of the Oracle instance in question. We > should instead > use the TO_DATE function to do an explicit conversion from string -> > DATE. Using > TO_DATE you can specify the format along with the string, so there's > no chance of > a mismatch. Here's the man page for TO_DATE: > > <http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90125/functions134.htm#1003595> > > > We probably should use something like this: > > TO_DATE('2002/12/6', 'YYYY/MM/DD') > > (assuming that the date is December 6th, not June 12th.) > > Jonathan > |