PC Review


Reply
Thread Tools Rate Thread

Dates in US format and EU-format

 
 
Fabian
Guest
Posts: n/a
 
      22nd Nov 2004
I am making a winforms-program in Visual Studio, that connects to an
Access database. In the database all dates are presented in this
format : dd-mm-yyyy. In my application I have a DatetimePicker, that
is presented in Dutch, the monthnames etc. But when I write this date
(e.g. 08-10-2004, which is oktober the 8th) to the table, my
application writes and picks up the date in US-format (10-08-2004).

My language settings for the machine are in Dutch notations, in Acces
the dates appear as I want them : mm-dd-yyy.

I have tried 'System.Threading.Thread.CurrentThread.CurrentUICulture =
New System.Globalization.CultureInfo("nl-NL")' and I have set Office
to work with the US language as default. No succes.

Can anyone advise me, please?
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      22nd Nov 2004
Fabian,

Until now I have not found a reason why you have to do it as you do it now,
the only problem can be when you use as sometimes in Holland is done a US OS
and the datetime setting in that is not changed in that.

Your program should take automaticly the culture from the settings, that is
one of the biggest benefits from dotnet.

(You can set the culture when you are using an offline document what has
dates in an other culture setting and set temporary the culture for the
thread that processes that to the culture of the document).

See, for that for us confusing internal Microsoft datetime format, the
thread from David Gacek some rows bellow your question, especially about
that USA and ISO that I wrote.

I hope this helps?

Cor

"Fabian" <(E-Mail Removed)>

>I am making a winforms-program in Visual Studio, that connects to an
> Access database. In the database all dates are presented in this
> format : dd-mm-yyyy. In my application I have a DatetimePicker, that
> is presented in Dutch, the monthnames etc. But when I write this date
> (e.g. 08-10-2004, which is oktober the 8th) to the table, my
> application writes and picks up the date in US-format (10-08-2004).
>
> My language settings for the machine are in Dutch notations, in Acces
> the dates appear as I want them : mm-dd-yyy.
>
> I have tried 'System.Threading.Thread.CurrentThread.CurrentUICulture =
> New System.Globalization.CultureInfo("nl-NL")' and I have set Office
> to work with the US language as default. No succes.
>
> Can anyone advise me, please?



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      22nd Nov 2004
"Fabian" <(E-Mail Removed)> schrieb:
>I am making a winforms-program in Visual Studio, that connects to an
> Access database. In the database all dates are presented in this
> format : dd-mm-yyyy. In my application I have a DatetimePicker, that
> is presented in Dutch, the monthnames etc. But when I write this date
> (e.g. 08-10-2004, which is oktober the 8th) to the table, my
> application writes and picks up the date in US-format (10-08-2004).
>
> My language settings for the machine are in Dutch notations, in Acces
> the dates appear as I want them : mm-dd-yyy.


Avoid dealing with string representations of dates:

<URL:http://groups.google.de/groups?selm=u4GnYacTCHA.2428%40tkmsftngp11>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      23rd Nov 2004
On 22 Nov 2004 02:04:14 -0800, (E-Mail Removed) (Fabian) wrote:

¤ I am making a winforms-program in Visual Studio, that connects to an
¤ Access database. In the database all dates are presented in this
¤ format : dd-mm-yyyy. In my application I have a DatetimePicker, that
¤ is presented in Dutch, the monthnames etc. But when I write this date
¤ (e.g. 08-10-2004, which is oktober the 8th) to the table, my
¤ application writes and picks up the date in US-format (10-08-2004).
¤
¤ My language settings for the machine are in Dutch notations, in Acces
¤ the dates appear as I want them : mm-dd-yyy.
¤
¤ I have tried 'System.Threading.Thread.CurrentThread.CurrentUICulture =
¤ New System.Globalization.CultureInfo("nl-NL")' and I have set Office
¤ to work with the US language as default. No succes.
¤
¤ Can anyone advise me, please?

Access expects dates to be in U.S. format when using SQL so you will need to format the date
accordingly before update.


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      23rd Nov 2004
¤
> ¤ I have tried 'System.Threading.Thread.CurrentThread.CurrentUICulture =
> ¤ New System.Globalization.CultureInfo("nl-NL")' and I have set Office
> ¤ to work with the US language as default. No succes.
> ¤
> ¤ Can anyone advise me, please?
>
> Access expects dates to be in U.S. format when using SQL so you will need
> to format the date
> accordingly before update.
>
>

Paul I am from Holland (nl-NL), you make me curious why does it go well when
I use a datetime in access withouth formating it.

I know no culture which is original using arabian numbers for dates, which
uses the USA dateformat beside the USA.

There can be more cultures, however it would be a greath stupidity from
Microsoft as it was as you wrote.

But it is not, Microsoft uses as I showed in another thread internaly
everywhere the same datetime format.

A pity is that it is the USA format and not ISO, what leads easily to
misunderstanding for people beside those in the USA and cultures not based
on Arabian numbers which use in arabian numbers written dates in a kind of
CocaCola culture format.

Cor


 
Reply With Quote
 
Doug Bell
Guest
Posts: n/a
 
      24th Nov 2004
Cor,
I have to agree whole heartedly. The backward format used in the US causes
grief when it forced on to the rest of the World.

In Access you need to format dates in the backward format (sometimes) when
used as criteria in queries. (Even though dates are stored internally as a
number)

Also had an instance some years back with a Honeywell Building Automation
System. It would not display in any other format. We did not sell any more
in Australia but started using the products that were developed in Europe.

Doug

"Cor Ligthert" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> ¤
> > ¤ I have tried 'System.Threading.Thread.CurrentThread.CurrentUICulture =
> > ¤ New System.Globalization.CultureInfo("nl-NL")' and I have set Office
> > ¤ to work with the US language as default. No succes.
> > ¤
> > ¤ Can anyone advise me, please?
> >
> > Access expects dates to be in U.S. format when using SQL so you will

need
> > to format the date
> > accordingly before update.
> >
> >

> Paul I am from Holland (nl-NL), you make me curious why does it go well

when
> I use a datetime in access withouth formating it.
>
> I know no culture which is original using arabian numbers for dates, which
> uses the USA dateformat beside the USA.
>
> There can be more cultures, however it would be a greath stupidity from
> Microsoft as it was as you wrote.
>
> But it is not, Microsoft uses as I showed in another thread internaly
> everywhere the same datetime format.
>
> A pity is that it is the USA format and not ISO, what leads easily to
> misunderstanding for people beside those in the USA and cultures not based
> on Arabian numbers which use in arabian numbers written dates in a kind of
> CocaCola culture format.
>
> Cor
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting dates in text format to date format. PJF Microsoft Excel Discussion 8 20th Feb 2007 05:12 AM
CONVERT DATES FROM EUROPEAN FORMAT TO US FORMAT =?Utf-8?B?bGVzOA==?= Microsoft Excel New Users 8 8th Aug 2006 05:48 PM
Format text 'dates' to real dates =?Utf-8?B?SmFjeQ==?= Microsoft Excel Worksheet Functions 4 24th Jul 2006 02:10 AM
format to self-join text dates and date/time dates =?Utf-8?B?Si5TY290dA==?= Microsoft Access 2 15th Jun 2005 01:43 AM
the dates on cell format make different dates. =?Utf-8?B?ZGF0ZSBmb3JtYXRzIG1vcnBoIHRoZSBkYXRlcy9j Microsoft Excel New Users 6 18th Apr 2005 02:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:54 AM.