datetime in MSSQL 2008

  • language settings can be login specific, try logging in with the login that is causing issues and run;

    SELECT @@Language

  • It sounds like your connection is picking up the US language instead of the Windows settings, which is the normal behavior. To change the settings for default language for a connection (and thus the date formats), refer to http://msdn.microsoft.com/en-us/library/ms191448.aspx

  • Source-NH (6/2/2011)


    It sounds like your connection is picking up the US language instead of the Windows settings, which is the normal behavior. To change the settings for default language for a connection (and thus the date formats), refer to this.

    Select * from Working_Urls where This = 'http://msdn.microsoft.com/en-us/library/ms191448.aspx'

  • Sorry about that. Thanks for the catch Ninja's. URL fixed.

  • Source-NH (6/2/2011)


    Sorry about that. Thanks for the catch Ninja's. URL fixed.

    Happens all the time :hehe:!

  • ..me again...

    SQL 2005 and 2008 give me same answer on SELECT @@Language

    it is: us_english

    If I try - set language slovenian, I get "Changed language setting to slovenski."

    But if I put

    set language slovenian

    insert into datum values (getdate())

    I still get "2011-06-02 16:10:22.327"

    _______

    I've tried this:

    SET DATEFORMAT dmy;

    GO

    DECLARE @datevar datetime2 = '31/12/2008 09:01:01.1234567';

    SELECT @datevar;

    GO

    results: 2008-12-31 09:01:01.1234567

    _________

    SELECT * FROM sys.configurations

    ORDER BY name ;

    GO

    1126default full-text language1033021474836471033default full-text language11

    124default language

    18

    0

    9999

    18

    default language

    1

    0

  • sory, I've pushed ENTER too early...

    Last thing above is result from sys.configurations and it's same in 2005 and 2008...

  • To see a list of the languages and their id's, use "select * from sys.languages"

    Then, try to set the language to "Slovene", which is the name listed in sys.languages (I believe - ID=1060). Try that and see what happens. If it works, then you can use "sp_defaultlanguage" to set the default for the logins that need it.

  • The default_language is already set to "slovenian" (18).

    I can view, check and change ths via server properties/advanced.

    It cannot be changed directly by query (update sys.configuration)

    I'm pretty sure slovene is 18, because when I changed it to Slovak the value went to 17 (18 before)

  • Unfortunately, like others, I am out of ideas. Sorry it didn't help.

  • If it were me I'd be to the point of calling PSS.

    I've hit that very same bug back in the day and outside changing the dateformat at connection creation time I never got is solved "server side"... I wish I knew how to fix it tho!!

  • Feanor (6/1/2011)


    @Ninja's_RGR'us,

    hello, thanks for answering.

    I put a link to picture, where old sql2005 (left side) and new sql2008 (right side) are shown.

    http://www.nuk.uni-lj.si/dokumenti/sql.jpg

    The collation is the same..

    Maybe it doesn't matter to the OP, but just a suggestion regarding security for your future screenshot posting:

    You'd better black out the server name and connection account information on the screenshot... otherwise, the whole world knows your server name and login information, which is not good. Same applies to when you post the error message here. Please try to leave out your server specific information. 🙂

Viewing 12 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic. Login to reply