Home All Groups Group Topic Archive Search About
Author
21 Oct 2005 1:49 PM
Madhivanan
How do I know the current Date Format of the Database?

Madhivanan

Author
21 Oct 2005 2:17 PM
Erland Sommarskog
Madhivanan (madhivanan2***@gmail.com) writes:
> How do I know the current Date Format of the Database?

There isn't one. The database itself does not have a date format. Dates
in SQL Server are stored as a binary value, as the number of days since
1990-01-01.

However, there is a session-specific setting for dateformat is controlled
with the command SET DATEFORMAT, and which also is affected by SET LANGUAGE
and the user's default language. This setting controls how date literals
are interpreted, nothing else. You can get this setting with help of
DBCC USEROPTIONS.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Author
21 Oct 2005 2:20 PM
Madhivanan
Thanks Erland

Madhivanan

AddThis Social Bookmark Button