Re: mm/dd/yyyy format question




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

.



Relevant Pages

  • Re: mm/dd/yyyy format question
    ... The SQL server nor a Net program do deal with a string format. ... The former communist countries have used it a while, ... > If the original question had been about what .Net classes/objects to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: mm/dd/yyyy format question
    ... I was not talking about how .Net or SQL Server stores date/time values ... I get the impression that you are talking about ISO 8601 in terms ... applications use the format for unambiguously representing date/time ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Querying on dates in dd/mm/yyyy hh/mm/ss format using Access2002 And SQL Server 7
    ... For parsing a string to a date/time, the 103 format doesn't limits the user ... > which is used as the row source for the results form). ... > other solutions assuming I have to use SQL Server 7? ... > I don't understand how I can use parameterized stored procedures to solve ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Moving a VBA function to SQL server
    ... "String Functions " in Books Online. ... The SQL server database contains a table named 'WorkOrders'. ... This will produce a job header formatted like this: ... The format he specifies is stored in table 'Settings' - field 'JobHdrMask' ...
    (comp.databases.ms-access)
  • Re: unicode textbox problem
    ... I get the data in the above format from SQL server. ... If I move the same data into an asp:textbox, or an html input textbox, I ... But I need this to show the Chinese characters. ...
    (microsoft.public.dotnet.languages.csharp)