-
Hi,
I'm getting crazy with such simple thing...
I'm using:
wdate = Format(MskDate.Text, "dd/mm/yyyy")
wSQL = "UPDATE Customers SET DateExp=" & wdate & " WHERE CodeUser='TEST'"
but it records the date in my table as "01/01/1900"
Why?
I also tryed to use # in the update statement, but no success...
-----------------------------------------------------------------------
I also tryed:
MskDate.Text = "15/10/2002"
wSQL = "Update CUSTOMERS Set DateExp = MskDate.Text Where CodeUser='TEST'"
This is the error message:
"The conversion of char data type to smalldatetime data type resulted in a out-of-range smalldatetime value"
-----------------------------------------------------------------------
Note: I'm using SQL 7 and smalldatetime data type.
Thanks for any help...
Michel Junior
-
Michel,
do you really need to store the date in that format within the db??, or are you going to retreive the date later and use it in your code??. I just store dates as date/time data types and then when I retrieve them from the db I format them before I put them into my controls.
john