Database UK date time format

Discussion in 'Databases' started by t00nlad75, Feb 4, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm am having trouble trying to display database dates in UK format.

    Having developed on local PC with UK setting dates are returned as expected in '07/03/2009 19:00' format.

    However, once attach db to live server all the date are shown as '3/7/2009 7:00:00' , which is causing issue when formated in .net as long dates or trimmed to remove time if need be.

    I have added Language=British to the connection string which had made no change



    "Data Source=tcp:esql2k801.discountasp.net;Initial Catalog=SQL2008_594700_xxx;UserID=SQL2008_594700_xxx_user;Password=xxx;Language=British;"


    Any help appreciated?


    Thanks
     
  2. JorgeR

    JorgeR DiscountASP.NET Staff

    The SQL Engine sends back data in binary format and it up to client application to interpret back the results. We recommend that you use the Convert function SELECT CONVERT(varchar(15), Getdate(),103) when inputting to your database - http://msdn.microsoft.com/en-us/library/ms187928.aspx (for the style). Try changing the language of the SQL Login


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page