Click to See Complete Forum and Search --> : Month Query


netman182
08-14-2003, 01:16 AM
I'm trying to figure out what is i'm sure a simple sql statement. I know i should know this but simply i do not.

I have 2 drop down boxes one with a category and the other will have the month in. I have the first one working fine. Now heres where i have the problem. With the month.

In my database i have the short month field for the date. exp. 8/13/2003 in my drop down box and my query i want to search from just the date. Does anyone know how to do that??? if so please let me know i am pulling my hair out and soon i might not have any left.

Stefan

rdoekes
08-14-2003, 04:33 AM
If your database is SQL server, you could use the t-sql function DATEDIFF

....WHERE DATEDIFF(dd, '8/11/2003', monthfield) > 0

In Access you could just use
... WHERE monthfield > #8/11/2003#

Hope this helps,

-Rogier Doekes