Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

Home    ASP .NET    The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

       


The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.]
   System.Data

[SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.]
  System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194

Problem is with date format . Try changing the date to a day less than 12 and it would work 

This error happens when U have system date in dd-mm-yy insted of mm-dd-yy format 

This is how you fix it 

Start->ControlPanel
Regional & language Options
click on customize 
select date tab

change Short Date Format to - MM/dd/yyyy

You are good to go. I am not sure if you have to reboot the machine. If it 
dosent work then just reboot your machine. 






  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam