Re: mm/dd/yyyy format question
- From: Joergen Bech <jbech<NOSPAM>@<NOSPAM>post1.tele.dk>
- Date: Wed, 21 Dec 2005 17:34:05 +0100
The original question stated
"what is the logical way to configure server, sql server or program so
it always deals with date as mm/dd/yyyy format".
And I also said that I recommended the ISO approach when
"passing date information as a string" (I use it myself and have
never looked back).
I know that .Net takes care of all this provided that one goes
through the proper objects.
I guess my head was still in my last project where I bypassed
those objects in favor of building my sql inserts from scratch
for performance reasons.
Whatever the programming language or supporting constructs,
I still feel the links I provided are relevant to the question.
ISO 8601 specific to Asian countries? This is the first time I
have heard that. Can you provide me with some links to some
more information? As the article in the Microsoft link stated,
the ISO format is unambiguous to SQL Server and is recommended
for that reason, regardless of the locale settings or country.
I only mentioned the ISO format because other posters started
talking about mm-dd-yyyy and dd-mm-yyyy.
If the original question had been about what .Net classes/objects to
use in order to pass date information correctly to and from SQL
Server, I suppose we would have had an entirely different
discussion.
My apologies if I have misunderstood something.
Regards,
Joergen Bech
On Wed, 21 Dec 2005 17:05:58 +0100, "Cor Ligthert [MVP]"
<notmyfirstname@xxxxxxxxx> wrote:
>Joergen,
>
>This is a VB.Net newsgroup not an SQL language newsgroup.
>
>Why would you do that for an SQLSever which notate its dateTime in ticks and
>for what has .Net very automatic localized methods?
>
>To explain you more.
>ISO8601 is used in Asia (not all countries)
>dd-mm-yyyy is used in Europe/Africa/Australia/America with the exception of
>USA and Mexico
>mm-dd-yyyy is used in the USA and Mexico (from the last I am not even sure)
>
>However with Net there is no need to think about that when you use the
>settings of the OS (that is by doing nothing extra)
>
>(If you use direct SQLServer without Net than you have to make a choose,
>however that is not the situation).
>
>In cases beside Net my preference is ISO8601 by the way.
>
>Cor
>
>"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAM> schreef in bericht
>news:fnriq11ul3hm1vht5mqdbhhasbkjaf92ci@xxxxxxxxxx
>> On Tue, 20 Dec 2005 13:47:02 -0800, Roy
>> <Roy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>>Hi all,
>>>
>>>I'm creating a project that should always use this date format when
>>>displays
>>>the dates or create dates. The back end database is a SQL Server and I
>>>like
>>>to know what is the logical way to configure server, sql server or program
>>>so
>>>it always deals with date as mm/dd/yyyy format.
>>>Thanks in advance.
>>>
>>>Roy
>>
>> Use the ISO 8601 format when passing date information as a string to
>> SQL server, i.e. "YYYYMMDD".
>>
>>
>> For more information, see
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;173907
>>
>> Another interesting article about SQL Server date handling:
>> http://www.sqljunkies.com/Article/6676BEAE-1967-402D-9578-9A1C7FD826E5.scuk
>>
>> More info about ISO 8601:
>> http://www.cl.cam.ac.uk/~mgk25/iso-time.html
>>
>> As another poster replied, you should not presume that the
>> system is configured to handle dates formatted in any
>> particular manner. Specific (localized) formats should be reserved for
>> input validation and output representation.
>>
>> Hope any of this helps.
>>
>> Regards,
>>
>> Joergen Bech
>>
>>
>>
>
.
- Follow-Ups:
- Re: mm/dd/yyyy format question
- From: Cor Ligthert [MVP]
- Re: mm/dd/yyyy format question
- References:
- Re: mm/dd/yyyy format question
- From: Joergen Bech
- Re: mm/dd/yyyy format question
- From: Cor Ligthert [MVP]
- Re: mm/dd/yyyy format question
- Prev by Date: no touch deployment CLR2.0 with a ? query string
- Next by Date: Re: How do I move a project into another folder?
- Previous by thread: Re: mm/dd/yyyy format question
- Next by thread: Re: mm/dd/yyyy format question
- Index(es):
Relevant Pages
|