views:

56

answers:

1

I have a string 1993-08-02 00:00:00.0 and I would like to update the date field in a Access Table

This is what I have but it is not working.

UPDATE [Table] SET `Birthdate` = '1993-08-02 00:00:00.0' WHERE `ID` = 000
+1  A: 

Dates are not strings, but either of the following will result in a date:

DATE [Table] SET `Birthdate` = CDate('1993-08-02 00:00:00.0') WHERE `ID` = 000

(see the documentation for CDate)

DATE [Table] SET `Birthdate` = #08/02/1993# WHERE `ID` = 000
Dolph
The first one didn't work for me but the second one worked like a charm! Thanks!
twodayslate
The first one assumes you are using the Jet/ACE expression service. Given that you failed to specify the environment from which you are calling Jet, it's no wonder you got one answer that didn't work for you.
David-W-Fenton