Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 datetime format issue in SQL Express

Author  Topic 

srivatsahg
Yak Posting Veteran

71 Posts

Posted - 2009-09-08 : 11:34:31
Hello All
Im facing an issue with the SQL Server 2005 Express.

The error i get is :
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

The settings in my PC is :
The SQLServer Express language setting is German (datetime is dd.mm.yyyy format)
Regional language and datetime settings in my machine is German format.

DSN language settings: German

However when i query the column values in my applications through the DSN i get the results in mm.dd.yyyy format, which is causing the exception.

Any help deeply appreciated.
Srivatsa


TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-09-08 : 13:37:34
Post the query you are using to get these values. And post the sql datatype of the column where these "date" values are stored.

Be One with the Optimizer
TG
Go to Top of Page

srivatsahg
Yak Posting Veteran

71 Posts

Posted - 2009-09-09 : 03:08:36

The datatype for this particular column is datetime
The sql query used to get the datetime column is just a plain and simple select statement.

SELECT Datetimestamp,EventName from SystemEvents


Any help in this direction
Regards
Srivatsa
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-23 : 08:17:13
quote:
Originally posted by srivatsahg


The datatype for this particular column is datetime
The sql query used to get the datetime column is just a plain and simple select statement.

SELECT Datetimestamp,EventName from SystemEvents


Any help in this direction
Regards
Srivatsa


Do you get any error when you directly execute in Query analyser?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -