Sam (sa**************@voila.fr) writes:
In SQL Server when I create a stored procedure, in the list of stored
procedures the Create Date column used to be formatted as:
28/09/2004 14:35:24
But since yesterday, for some reason, when a new stored procedure is
created, the date appear as :
2005-05-31 14:03:07.854
Why??!? This is very annoying to sort my procedures by date as it
messes up everything..
SQL Server is a server application, so SQL Server itself does not
display anything. So apparently you see this in some client tool,
and thus the formatting depends on that tool. Since I don't know
which tool you use, I will have to guess a bit.
In Query Analyzer, dates are always displayed as YYYY-MM-DD HH:mm:ss.fff,
unless you check "Use regional settings" under Tools->Options.
In Enterprise Manager, under Databases->db->stored procedures there is
a listing. I would expect this listing to respect your regional settings.
Currently I see YYYY-MM-DD HH:mm:ss, which are my regional settings, but
this could very well be a hard-coded format.
I don't know about this screen, but I seem to recall that there are
other screesn in EM, when you sort on dates, it sorts the string, which
is a disaster with a format like DD/MM/YYYY.
Anyway, YYYY-MM-DD is the international standard for date formats, so
why not get used to it?
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp