RSS Links

 

Here are all of the RSS links for sections of this site

VB.NET/ASP.NET
 Java
 Unix/Linux
 Windows
 SQL Server

Home arrow SQL Server arrow The conversion of a char data type to a datetime data type resulted in an out-of-range datetime sql
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime sql PDF Print E-mail
Sunday, 16 November 2008
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime sql server error

This can be caused by either not getting the date / time format correct in the VB or by the SQL login not having
the correct local specified for UK it should be set to British English

The format of the date/time should be

Dim Now As DateTime = DateTime.Now()
''2003-12-23 22:12:00'
DateString = "'" & Now.Day() & "-" & Now.Month() & "-" & Now.Day() & " " & Now.Hour() & ":" & Now.Minute() & ":00'"

There is also an interesting article by Srinath MS on devx.com which talks about something similar here

Last Updated ( Wednesday, 31 December 2008 )
 
< Prev
 
Designed by Graham Robinson Software