set dateformat

  • I want to set the dateformat to dmy in the server , when i use the select getdate() function it is display 2007-09-14.

    why is the set datformat dmy not working. Please help

  • HI There,

     

    I found this in BOL:

    This setting is used only in the interpretation of character strings as they are converted to date values. It does not affect the display of date values.

     

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/da217878-7ec4-477e-aa13-604073c948f8.htm

     

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Jai,

    if you read carefully in BOL you will see that the SET DATEFORMAT option only applies to the entering of dates and not the way they are displayed.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • how to check what is the date format of the sql server. why the display is different from that i have set. how to ensure that the date format i have set is dmy for the server.

  • Jai,

    as you can find in several other posts on tyhis site, you the best place to handle date formats is the client application not the server. It's not important how SQL server stores the data.  If you have to do it in your SQL queries use CONVERT and a formattype to get whatever you want.

    Markus

    [font="Verdana"]Markus Bohse[/font]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply