Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Date Format Problem with SQL SERVER ENGLISH VERSION Expand / Collapse
Author
Message
Posted Saturday, May 11, 2013 7:33 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 31, 2013 3:28 AM
Points: 13, Visits: 43
Please, I have installed SQL SERVER 2008 R2 Standard Edition English Language. The Collation of the server is : French_CI_AS. I have restored my database. The collation of my database is SQL_Latin1_General_CP1_CI_AS. I have observed that all the dates are treated with the format MM/DD/YYYY. And this format is not compatible with my application Software. For example, when i want to visualize the report of March ( from '01/03/2013' To '31/03/2013') the application send me this error “The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.” Another example, When i execute this query in the query analyzer "Update Cloture_Chiffre set Date_cloture='28/02/2013'" I receive the same error message. I did not have this error when the application Software was running on sql server 2008 R2 FRENCH EDITION. Please what can i do to change this situation so that sql server will treat all the dates with the format DD/MM/YYYY; so that this command "Update Cloture_Chiffre set Date_cloture='28/02/2013'" (28 FEBRUARY 2013) could work.
Thanks a lot in advance.
Post #1451827
Posted Saturday, May 11, 2013 8:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 2:08 PM
Points: 395, Visits: 2,698
Maybe give SET DATEFORMAT a try:

http://msdn.microsoft.com/en-us/library/ms189491.aspx
Post #1451832
Posted Sunday, May 12, 2013 12:37 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 31, 2013 3:28 AM
Points: 13, Visits: 43
It's a solution I needed.
Thank you very much
Post #1451923
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse