Saturday, February 25, 2012

Date Format

Anyone can tell me what should I do to change the default
SQL date format from (MM/DD/YY) to (DD/MM/YY)?
Anything that I can do in the server side without touching
the client side coding.
I have another Problem that my SQL server is hosting more
than 1 database and some of the database want the date
format to be in (MM/DD/YY).
My problem is without affecting other database date
format, how should I input a new database with data format
(DD/MM/YY)?
Thanks a lot.Bee,
I don't think you can do precisely what you want.
The language ( which includes dateformat ) is associated with a login, not a database.
So if you can have a specific user requiring a different date format then
sp_defaultlanguage or Enterprise Manager may do this for you.
Otherwise at run time you can either:
set dateformat or set language
or as I do always use CONVERT with a named style, so that I don't care what
date format the server is set to.
HTH
AJ
"Bee" <ngebw@.hotmail.com> wrote in message news:033101c34f3b$e0dd2540$a601280a@.phx.gbl...
> Anyone can tell me what should I do to change the default
> SQL date format from (MM/DD/YY) to (DD/MM/YY)?
> Anything that I can do in the server side without touching
> the client side coding.
> I have another Problem that my SQL server is hosting more
> than 1 database and some of the database want the date
> format to be in (MM/DD/YY).
> My problem is without affecting other database date
> format, how should I input a new database with data format
> (DD/MM/YY)?
> Thanks a lot.

No comments:

Post a Comment