Why does a calculated date give the wrong result in an SQL statement?
Access 2002 Help says: You must use English (United States) date formats in SQL statements in Visual Basic. However, you can use international date formats in the query design grid. (Search with dates in SQL) If you have a form with a date field called txtStartdate, a variable called dtDate of Date datatype, and a table called TempDate with just one column for a date, then the following statements will all insert the correct date in the destination table: dtDate = txtStartDate DoCmd.RunSQL “INSERT INTO TempDate VALUES (#” & dtDate & “#)” from variable DoCmd.RunSQL “INSERT INTO TempDate VALUES (#” & txtStartDate & “#)” from form DoCmd.RunSQL “INSERT INTO TempDate VALUES (#” & Date & “#)” todays date However, if you want to do a calculation on a date (calculate a date a library book is due back, for example) statements such as dtDate = DateAdd(“ww”, 2, Date) add 2 weeks to today ‘dtDate = DateAdd(“d”, 14, Date) alternative method DoCmd.RunSQL “INSERT INTO TempDate VALUES (#” & dtDate & “