I need a recordset returned based on the condition that one of my fields equals the current date. How do I do this?
Today = Date()<BR>SQL = "Select * From Table Where DateField= #" & Today & "#"
And was wondering if there was a pure sql solution.
In Access. Do you mean a query in Access maybe? And yes....This SQL should fix you up.
I call it an sp because asp doesn't differentiate.<BR><BR>I've got this:<BR>SELECT [tabJobs].[jobsID], [tabJobs].[fueltot], [tabJobs].[groctot], [tabJobs].[timestop]<BR>FROM tabJobs<BR>WHERE ((([tabJobs].[timestop])=Date()));<BR>
And yep, in my code, chnge the table name to tabJobs and the DateField to timestop, and you'll be good to go.
not working. I'm following the format you gave.
WHERE ((DatePart("d",[tabJobs].[timestop]))=DatePart("d",Date()))<BR><BR>My timestop field is of Date/Time type General. Maybe this is why the other wouldn't work.