to perform a calculation using current date in a sql select statement...date()-startdate as totdate. I get an error message saying date not a function name????
Printable View
to perform a calculation using current date in a sql select statement...date()-startdate as totdate. I get an error message saying date not a function name????
The error is because you are using paranthesis beside date ie date() which tells that it is a function.Why don't you do that using DateDiff function.
I'm not sure but maybe you could try this at home:
Code:'Select all records where the date field is greather than today's date...
Set RS=DB.OpenRecordSet("SELECT * FROM table WHERE datefield > " & Date() & " ORDER BY field")