|
-
Jun 25th, 2003, 09:15 AM
#1
Thread Starter
Member
sql server error
I am currently having a very strange error. I use the following query in my ASP.net program and for a couple of days ago it worked perfect. But then out of nowhere I get this system error
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated.INSERT INTO Forms (formxml,formfile,formcheck,formindat) VALUES ('rapautomatisering.xml','rapautomatisering7.xml','N','25-06-2003');
what the hell happened ?
It seems that the formindat value in my querie causes the problem, but in the table the datatype o fthe field is 'datetime'. And it worked a couple of days ago! help
best regards,
Krol
-
Jun 25th, 2003, 09:42 AM
#2
The date is formatted as "dd-mm-yyyy"....
SQL Server wants the date as "mm/dd/yyyy"... so it tries to interpret 25 as the month.... since it couldn't it thinks that the date is invalid.
-
Jun 25th, 2003, 10:02 AM
#3
Thread Starter
Member
thANKS
Man,
Am I glad You responded to my thread.
This explains why it worked earlier.
thanks a lot!
Krol
-
Jun 25th, 2003, 05:13 PM
#4
Hyperactive Member
Try putting this in any SQL query where there are dates
'SET DateFormat DMY --Rest of query here'
Cheers
MarkusJ
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
|