SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 datetime format issue in SQL Express
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

srivatsahg
Yak Posting Veteran

Germany
71 Posts

Posted - 09/08/2009 :  11:34:31  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 09/08/2009 :  13:37:34  Show Profile  Reply with Quote
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

Germany
71 Posts

Posted - 09/09/2009 :  03:08:36  Show Profile  Reply with Quote

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

India
22744 Posts

Posted - 09/23/2009 :  08:17:13  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000