Problem with Date Parameters in Recordset

jon_sg

Registered User.
Local time
Today, 23:46
Joined
Oct 5, 2003
Messages
42
Can anyone help

I need to return records into a DAO recordset based on an SQL statement for the week of a year from a date stored in a table. I have had problems using the DatePart Function as an expression in the query.

Thanks for your help

Jon
 
Specifically, what are you looking for referring to "the week of a year from a date"? Are you looking for a specific week by number (1-52)?
 
What error message did you get?

You might use ' instead of " in the SQL statement. Something like this.

SELECT DatePart('ww',Date()) AS WeekNum;

:)
 
Thanks folks

It was an embarrassingly simple simple solution really but I couldn't see it Yesterday, Instead of adding an extra col into the SQL stmnt to calculate DatePart("ww"", [Field])and getting the parameter from the form I was trying to compare two date parts in the where clause.

You know what its like after a long day.

Kind Regards

Jon
 

Users who are viewing this thread

Back
Top Bottom