Change SQL7 Date MMDDYY format default to DDMMYY default

  • I am importing data to a SQL7 table which contains DATETIME cols., using regular 'INSERT INTO' SQL statements.  Can someone please tell me how to configure SQL Server so the default date format is British, not U.S. dates. MSDN has a HOW TO article but it only works for SQL6.5 ( I get an error message in 7.0, "Could not find stored procedure sp_addlanguage").

    My INSERT INTO statement contains the dates in single-quoted 'DD/MM/YY' form and they insert the table without error, but SQL7 turns the Ds and Ms around! I tried running:

     EXEC SP_CONFIGURE 'default language',1

    ...but this made no difference to behaviour. Any clues please?

    thanks

    Robin Pearce

     

  • Books Online says that the 'default language' setting is for new accounts. To change an existing session, you can use the command SET LANGUAGE before running the insert. 

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • SET LANGUAGE works just fine, thanks - though I notice that ADO throws out an error message, code 0 which I can test for and avoid.

    Robin P

     

Viewing 3 posts - 1 through 2 (of 2 total)

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