|
-
Mar 31st, 2001, 03:34 PM
#1
Thread Starter
Addicted Member
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
-
Apr 1st, 2001, 09:06 AM
#2
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|