Hi Noel, A Datetime field is not a text (string) field, and the "Begins with", "Contains" and "Ends with" operators are just for text.
You'll have to use a range in your Search Action. Something like: my_datetime_field >= '01/08/2003 00:00:00' AND my_datetime_field < '01/09/2003 00:00:00' I can't remember exactly with Access, but I think you need to include the time part (00:00:00 is midnight). Forcing a date value to be the first day of the month is easy using the FORMAT attribute, like so: <@ARG my_date FORMAT="datetime:01/%m/%Y 00:00:00"> Incrementing the argument value to be the first of the next month can be done like this: <@ARG my_date FORMAT="datetime:01/<@CALC EXPR='<@ARG my_date FORMAT="datetime:%m"> + 1'>/%Y 00:00:00"> Of course, you'll have to do a little extra work to make sure the month value is not incremented from 12 to 13, because then you'll need to roll over the year value and adjust the month to 01. Note: If you're doing this in a Direct DBMS Action, the syntax for datetime values in ODBC SQL can be quite different than the above. Hope this helps. Cheers.... Scott Cadillac, XML-Extranet - http://xml-extra.net 403-281-6090 - [EMAIL PROTECTED] Well-formed Development -- Extranet solutions using C# .NET, Witango, MSIE and XML > -----Original Message----- > From: noel estabrook [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 3:11 PM > To: [EMAIL PROTECTED] > Subject: Witango-Talk: Easy Question: doing date queries > > > Hard to believe I've never run into this before, but... > > I want to do a query on a Data/Time field (Access). I want to get > records where the date is of a certain month and/or a certain year. > But when I go to build the search action, all of the Begins With, > Contains and Ends with functions are all grayed out. Short of doing > a straight SQL query, is there any way to accomplish such a thing? > > TIA. > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > ______________________________________________________________ > __________ > TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
