Re: set date format?

From: Andrew J. Kelly (sqlmvpnoooospam_at_shadhawk.com)
Date: 04/27/04

  • Next message: TigerWu: "Re: Uni Code"
    Date: Mon, 26 Apr 2004 20:45:09 -0500
    
    

    The format of how something looks when displayed is a factor of the GUI in
    which it is displayed and not a database function. You can choose to use
    CONVERT() to force a particular string but that does defeat the ability for
    2 different GUI's in to display the data in their local format. The setting
    of SET DATEFORMAT is for input only. See here from BOL:

    This setting is used only in the interpretation of character strings as they
    are converted to date values. It has no effect on the display of date
    values.

    --
    Andrew J. Kelly  SQL MVP
    "Janus Knudsen" <anonymous@discussions.microsoft.com> wrote in message
    news:B4328BF7-6A2A-4624-97C0-DB348D9AA197@microsoft.com...
    > Hello...
    > As I remember I ran across a set statement that could control the
    dataformat on the server?
    >
    > For instance:
    > print cast(getdate as varchar) it returns current date and time in am/pm
    format, but in Denmark we're not using this format, we're using 24hour
    format. Obviously I could use CONVERT, but that's not an option in the
    current scenario!
    > The print output should be in 24hour format
    >
    > So if anybody can remember that... :O)
    >
    > Kind regards
    > Janus, Denmark
    >
    

  • Next message: TigerWu: "Re: Uni Code"

    Relevant Pages

    • Re: Tapble top fusion generator
      ... >increased my monitor format to 1280x1024 and display it on a Mitsubishi ... >using a screen format less than 1280x1024 and the low -resolution LCD ... >Since the poster writing about the character overlap, ... is, when you make one web site viewable, you can render others ...
      (sci.physics.fusion)
    • 2 Ques regarding dates (matching and subtracting)
      ... The end-user enters a date in cell a2, validated to format DD/MM/YYYY. ... In K30, I want to display the number of days until the end of the month, ... "Jacob" wrote: ... > I want to use a subtraction or matching formula. ...
      (microsoft.public.excel.misc)
    • Re: Dividing hours
      ... you can display these in a format that mimics time by making use of the ... The divisional manager will enter in the annual planned hrs on the ... worksheets Each workbook also has a calculation worksheet. ...
      (microsoft.public.excel.misc)
    • Re: Create Dynamic Controls and Displaying Page by Page on the for
      ... My computer is client and other is server. ... I want to display all recevied values for parameters ... > I'm saying this because dynamically creating a few thousand controls might ... >> row data format will be same. ...
      (microsoft.public.dotnet.general)
    • Re: Price Data Formatting
      ... When you load in a datafile of a stock or commodity, ... only 3 digits following the decimal rather than 4. ... So when I display prices in my application, I want to use the SAME format as ... It doesn't fit well in my textboxes for display. ...
      (microsoft.public.vb.general.discussion)