Re: Date Format
  Home FAQ Contact Sign in
microsoft.public.sqlserver.setup only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Date Format         

Group: microsoft.public.sqlserver.setup · Group Profile
Author: Aaron Bertrand [SQL Server MVP]
Date: Sep 18, 2008 09:44

> Thanks for the advice, I see exactly where your coming form there.
> How can I set that as the server default, as opposed to the US default
> format?

If you are passing a string into a stored procedure parameter that is
DATETIME or SMALLDATETIME, just make sure that the string is passed in as
the correct format. If you continue to use a regional format like m/d/y
there isn't really a good way for SQL Server to know that you meant m/d/y
and not d/m/y. What happens if two different users call the stored
procedure, one using 8/4/2008, and the other 4/8/2008, and they meant the
same date? For one of them, they are going to get the wrong data,
regardless of the regional settings on the machine, or the dateformat /
language settings of the user. You should read Tibor's article
thoroughly...
no comments
diggit! del.icio.us! reddit!