• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

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

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?

0
rmmarsh
Asked:
rmmarsh
1 Solution
 
PFrogCommented:
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.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
set dateformat dmy
insert into urTable ...
0
 
rmmarshAuthor Commented:
Ah yes, how simple (I forgot about that)... thank you so much...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now