Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: DBI and TIMESTAMP

by sth (Priest)
on Feb 03, 2003 at 19:04 UTC ( #232359=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: DBI and TIMESTAMP
in thread DBI and TIMESTAMP

By looking at the date format and syntax, my quess is you are using Oracle. I have found problems using the Oracle default date format with comparisons. What I tend to do in DBI code is set the date format with an alter session, usually right after the connect,

my $dbh = DBI->connect(); $dbh->do('alter session set nls_date_format = 'YYYYMMDD');

This sets the date format for the whole session. Then you can do compares with an easier format, select id from foo where date < 20001201; ..This also makes it easy to format a data file which may be read in for updates or comparisons to a db.

STH


Comment on Re: Re: Re: DBI and TIMESTAMP
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://232359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2014-10-01 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls