Re: set date format?

From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 15:26:33 +0100

Hi

Setting the default language with sp_configure will give a default date
format, but that can be overridden with SET LANGUAGE or SET DATEFORMAT (for
input) on the connection.

John

"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
>



Relevant Pages

  • Re: DATE TIME FUNTIONS
    ... Format 101 won't translate month names, and if the server language is ... Spanish, it won't understand "Aug". ... If you SET LANGUAGE to us_english, ...
    (microsoft.public.sqlserver.programming)
  • Re: Determine 1st day of each month
    ... SET LANGUAGE US_ENGLISH ... SET DATEFORMAT DMY ... The only safe format in SQL Server, when converting from string to date, is ... Every other format will require care... ...
    (microsoft.public.sqlserver.programming)
  • Re: Date Problems - ASP/SQL
    ... >> in the DB as DDMMYYYY. ... >> The Views work great using the DDMMYYYY format, ... It's amazing how easy it is for some user to enter SET LANGUAGE ... Or change regional settings on the machine. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Suppress auto-hyphenation for a single word
    ... apply the format to Merleau? ... | Set Language to apply "Do not check spelling or grammar" formatting to it. ... Suppressing spelling/grammar checking also suppresses autohyphenation. ...
    (microsoft.public.word.docmanagement)
  • Re: Determine 1st day of each month
    ... >safe at all. ... >SET LANGUAGE US_ENGLISH ... Every other format will require care... ... There is one more safe string format, I think, the one BOL calls ...
    (microsoft.public.sqlserver.programming)