Re: set date format?
From: Andrew J. Kelly (sqlmvpnoooospam_at_shadhawk.com)
Date: 04/27/04
- Previous message: Mauricio Freitas [MVP]: "Re: SQL access via ASP scripts?"
- In reply to: Janus Knudsen: "set date format?"
- Messages sorted by: [ date ] [ thread ]
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 >
- Previous message: Mauricio Freitas [MVP]: "Re: SQL access via ASP scripts?"
- In reply to: Janus Knudsen: "set date format?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|