Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 exploiting the Monastery: (6)
As of 2015-07-30 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls