dates issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam

    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

  • Erland Sommarskog

    #2
    Re: dates issue

    Sam (samuel.berthel ot@voila.fr) writes:[color=blue]
    > 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..[/color]

    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@sommarsk og.se

    Books Online for SQL Server SP3 at
    Get the flexibility you need to use integrated solutions, apps, and innovations in technology with your data, wherever it lives—in the cloud, on-premises, or at the edge.

    Comment

    • Sam

      #3
      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...:(

      Comment

      • Erland Sommarskog

        #4
        Re: dates issue

        Sam (samuel.berthel ot@voila.fr) writes:[color=blue]
        > 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...:([/color]

        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@sommarsk og.se

        Books Online for SQL Server SP3 at
        Get the flexibility you need to use integrated solutions, apps, and innovations in technology with your data, wherever it lives—in the cloud, on-premises, or at the edge.

        Comment

        • Sam

          #5
          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

          Comment

          • Erland Sommarskog

            #6
            Re: dates issue

            Sam (samuel.berthel ot@voila.fr) writes:[color=blue]
            > 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 ... :)[/color]

            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@sommarsk og.se

            Books Online for SQL Server SP3 at
            Get the flexibility you need to use integrated solutions, apps, and innovations in technology with your data, wherever it lives—in the cloud, on-premises, or at the edge.

            Comment

            • Sam

              #7
              Re: dates issue

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

              Comment

              Working...