MS Access is really funny. They store their dates in yyyy-mm-dd hh:mm:ss format, no matter how you think it looks in the table. And you can't simply write that format into the date field. :(
I ran into a similar issue a while back when trying to write a date to an MS Access database. I ended up having to use {ts '2001-01-01 23:59:59'} to pull it off. Granted, your issue may be unrelated, but if you're looking for dates, you may have to write them too.
So, anyway, back to your question: I tried this out earlier, and it should suit your needs, but is most likely a quick hack:
WHERE field BETWEEN #1/1/$year# AND #12/31/$year#Update: While sifting through the Cheetah Book (Programming the Perl DBI), I noticed that on page 293 it says this:
Similar escape sequences are defined for other date/time types. Here's the full set:
{d 'YYYY-MM-DD'} - date {t 'HH:MM:SS'} - time {ts 'YYYY-MM-DD HH:MM:SS'} - timestamp {ts 'YYYY-MM-DD HH:MM:SS.FFFFFFF'} - timestamp
In reply to Re: Type casting
by monkeygirl
in thread Type casting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |