Problems inserting date in table with different locale other than en-US

Posted on 2007-07-20
Last Modified: 2010-03-19
I have a DateTime in the format:  20/07/2007 08:14:18

I am trying to insert that into a table column whose format is DateTime (the locale is en-GB)...

I have two questions:
1.  when I installed SQL Server Express 2005 on my Win 2000 Pro machine (running in a virtual machine), whose locale was en-GB, did I have to do anything during the install to tell SQL Server of that locale?
2.  how do I get the date above into the column without getting a conversion error?

Question by:rmmarsh
    LVL 18

    Accepted Solution

    The easy way, which forces the locale to be ignored, is to format it as a long, such as
        dd mmm yyyy hh:nn:ss
    By expanding the numerical month into the month name, any locale will understand it correctly.
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    set dateformat dmy
    insert into urTable ...

    Author Comment

    Ah yes, how simple (I forgot about that)... thank you so much...

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
    Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now