in reply to compare dates
I don't have experience with Informix; here's how it would look with DBI and Oracle, using TO_DATE to convert the string. This example looks for rows with a date_new column before 26/11/1987.
I hope this is helpful; I would expect an Informix solution to look remarkably similar.my $sth = $dbh->prepare(<<EndOfSQL); SELECT id FROM mytable WHERE date_new < TO_DATE(?, 'DD/MM/YYYY') EndOfSQL $sth->execute('26/11/1987'); while (my @row = $sth->fetchrow_array()) { print "@row\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: compare dates
by extremely (Priest) on Jan 15, 2001 at 02:07 UTC |