Unix Technical Forum

dates issue

This is a discussion on dates issue within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, In SQL Server when I create a stored procedure, in the list of stored procedures the Create Date ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 07:44 AM
Sam
 
Posts: n/a
Default dates issue

Hi,
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..

Regards

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 07:44 AM
Erland Sommarskog
 
Posts: n/a
Default Re: dates issue

Sam (samuel.berthelot@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, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 07:44 AM
Sam
 
Posts: n/a
Default Re: dates issue

why not get used to it?

Simply because stored procedures created before yesterday have the
format YYYY-MM-DD and the stored procedure that I create now have
another format, therefore I can't sort by date the list anymore or it's
messed up...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 07:45 AM
Erland Sommarskog
 
Posts: n/a
Default Re: dates issue

Sam (samuel.berthelot@voila.fr) writes:
> why not get used to it?
>
> Simply because stored procedures created before yesterday have the
> format YYYY-MM-DD and the stored procedure that I create now have
> another format, therefore I can't sort by date the list anymore or it's
> messed up...


Huh? Sounds very strange. First of all, whatever function you are using,
close it down and start it again. (Or just press a Refresh button.)

If the problem still is there, take a screen shot, put it on a web
site, and post the link.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 07:45 AM
Sam
 
Posts: n/a
Default Re: dates issue

for some reasons, I've closed down sql server and all dates are in the
same format now.... weird... but my problem is solved anyway ...
thx

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-29-2008, 07:46 AM
Erland Sommarskog
 
Posts: n/a
Default Re: dates issue

Sam (samuel.berthelot@voila.fr) writes:
> for some reasons, I've closed down sql server and all dates are in the
> same format now.... weird... but my problem is solved anyway ...


And whatever you closed down, I'm quite sure that it wasn't SQL Server.
You closed down some tool which you did not tell us what it was. I
might be pedantic by making this point, but in many situations it's
important to understand what is SQL Server what is the tool. SQL Server
itself does *not* have a user interface.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-29-2008, 07:46 AM
Sam
 
Posts: n/a
Default Re: dates issue

By SQL Server, I meant Entreprise Manager... sorry for the confusion

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com