Hi,
I'm trying to write some VBA script which uses date in an SQL statement:
This however does not work; when the WHERE conditiion should be true, it always results in 0 appends.
What is wrong here?
CorrectDate is a date-typed variable.
Thanks!
I'm trying to write some VBA script which uses date in an SQL statement:
Code:
SQL1 = "INSERT INTO Contractrealisatie (Medewerker,Uren) SELECT Planning.Werknemer, (15*(Planning.[Stoptijd] - Planning.[Aanvangstijd])) FROM Planning WHERE ([Datum] = " & CorrectedDate & ")"
What is wrong here?
CorrectDate is a date-typed variable.
Thanks!
Comment