473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dates in US format and EU-format

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.CurrentUICu lture =
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?
Nov 21 '05 #1
5 1799
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" <ba***@chello.nl>
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.CurrentUICu lture =
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?

Nov 21 '05 #2
"Fabian" <ba***@chello.nl> 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/>
Nov 21 '05 #3
On 22 Nov 2004 02:04:14 -0800, ba***@chello.nl (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.CurrentUICu lture =
¤ 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 ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #4
¤
¤ I have tried 'System.Threading.Thread.CurrentThread.CurrentUICu lture =
¤ 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
Nov 21 '05 #5
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" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
¤
¤ I have tried 'System.Threading.Thread.CurrentThread.CurrentUICu lture =
¤ 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

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Erwin Moller | last post by:
Hi, Bad EU behaviour. :-( source: http://lwn.net/Articles/84301/ Regards, Erwin Moller (The Netherlands)
12
by: David Lindsay | last post by:
I want to put date and time on my web page, and to be sure it tracks the BST/ GMT changes. Can anyone help me, I have gone back in my historic file for quite a while and not found anything. Sorry...
111
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: ...
8
by: netsurfer | last post by:
Hi: Have a question on making the date automatically filled in by what the user enters in by the date at the top. The date entered at the top would most likely be on a Wednesday then I need...
2
by: Rachel Suddeth | last post by:
Is there a way to have the non-selectable dates (those before MinDate and after MaxDate) draw differently so my users can see right away what dates aren't allowed? I'm not seeing it... ...
0
by: TAKE a LOOK !!! | last post by:
The Domain www.bestwaypay.eu is now for selling. The Domain for OVER 450 Million People in Europe.
0
by: TAKE a LOOK !!! | last post by:
The Domain www.bestnewsletter.eu is now for selling. The Domain for OVER 600 Million People in Europe.
1
by: pitfour.ferguson | last post by:
My dbase has the start date and end date of each visit. How can I ask Access to list the day of the week of the start (easy), end (easy) and, more importantly, the dates of the visit itself - ie...
0
by: adminfreelance | last post by:
http://www.freelance.eu freelance, programming, outsourcing, programmer, outsource, php programming, mysql,mysql database database Freelance.eu , temporarily: post your projects for free and free...
27
by: rhaazy | last post by:
I need to write some javascript that will return a date string in the form mm/dd/yyyy. The date needs to be today's date - 30 days. Is there a relatively straight forward way to do this? So...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.