G
Guest
HI
In Access the date is like
21/12/2004 08:57:17 a.m.
I need to update the record only if it was not created more than five
minutes ago
cmd = "UPDATE Sales SET Status = 'A' WHERE Mid(SalesDate,13,20) > #" &
Mid(Microsoft.VisualBasic.DateAdd(DateInterval.Minute, -5,
DateTime.Parse(DateTime.Now.ToShortTimeString, myFormat)), 13, 20) & "#"
e.g
When the time is 2:07:00 p.m.
I can see the query goes to ADO like this
"UPDATE Sales SET Status = 'B' WHERE Mid(SalesDate,13,20) > #2:02:00 p.m.#"
but there is a syntax error, any idea
thks
In Access the date is like
21/12/2004 08:57:17 a.m.
I need to update the record only if it was not created more than five
minutes ago
cmd = "UPDATE Sales SET Status = 'A' WHERE Mid(SalesDate,13,20) > #" &
Mid(Microsoft.VisualBasic.DateAdd(DateInterval.Minute, -5,
DateTime.Parse(DateTime.Now.ToShortTimeString, myFormat)), 13, 20) & "#"
e.g
When the time is 2:07:00 p.m.
I can see the query goes to ADO like this
"UPDATE Sales SET Status = 'B' WHERE Mid(SalesDate,13,20) > #2:02:00 p.m.#"
but there is a syntax error, any idea
thks