in reply to DBD::ODBC, Access, date comparisons
Two thoughts come to mind, both SQL thoughts though.
Cast ClearDate into a date type instead of a date time type. Also use CURRENT_DATE in the place of the placeholder if you want just today in the format the database wants it.
The other option if you can't cast the type into the one you want is to use < and >= in two where clauses
... WHERE ClearDate >= '2003/03/20 0:00' AND < '2003/03/21 0:00' ... #or express this with a between clause
The typecast will be the best solution since you get the database to do the conversions so it likes whats going on.
Note: Of course you would parse up the 2 dates and put them in placeholders resulting in an approprate where for each query.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBD::ODBC, Access, date comparisons
by finni (Beadle) on Mar 20, 2003 at 16:30 UTC | |
by dga (Hermit) on Mar 20, 2003 at 16:44 UTC | |
by finni (Beadle) on Mar 20, 2003 at 17:13 UTC | |
|
Re: Re: DBD::ODBC, Access, date comparisons
by finni (Beadle) on Mar 20, 2003 at 16:41 UTC |