Inserting Date Problem

  • Hi,

    I have a Delphi application that builds up a piece of SQL to insert a date time value into a table.

    The SQL constructed inserts the date using MM/DD/YYYY HH:MM:SS format. For example the following SQL is created by the application to insert a date of the 4th January 2002:

    INSERT INTO DATETEST (DATEVALUE) VALUES ("01/04/2002 00:00:00")

    This works fine all our our client installations, except one where a date of the 1st April 2002 is inserted. It seems that SQL Server 7 is interpreting the dates as being in DD/MM/YYYY format.

    Changing the Delphi code isn't an option.

    How do I change the clients SQL Server setup to interpret the dates as MM/DD/YYYY?

    Is there some SQL or a stored procedure I can run to see what date settings they have on their server?

    We've tried setting up a test install on a SQL Server in our office to try and recreate the users problem but aren't able to. We've set the Default Language setting for the server and users to British English, but still can't recreate the problem. What's going on?

    Thanks in advance,

    Peter

  • Solved the problem.

    Start Enterprise Manager, select Security folder and Users. Set each users

    Default Language to British English.

  • Thanks for the follow up - sorry we werent able to help you on this one!

    Andy

  • Interesting. Did the users get setup in some special way to cause this? What was the settting?

    Steve Jones

    steve@dkranch.net

  • Yes. They installed SQL Server using the custom install option and set the language to English British instead of the default English.

  • When you setup a user, do they not get British English as the default? Or is it always English?

    Steve Jones

    steve@dkranch.net

Viewing 6 posts - 1 through 5 (of 5 total)

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