Question Setting FirstDayOfWeek throws an execption

rollec

New member
Joined
Aug 28, 2008
Messages
2
Programming Experience
Beginner
Hi
i´m trying to set the System Time For my Program and it doesn´t really work.
I have the problem, that the client machine uses German regianl Settings But my .Net is English one.
if I generate some Reports it brings up the British CalendarWeek
so FirstDayOfWeek is set to Sunday.
i Need it to be set to Monday.

Could someone help me please?
:(

VB.NET:
System.Globalization.DateTimeFormatInfo.InvariantInfo.FirstDayOfWeek = DayOfWeek.Monday

I have just found this on MSDN, but i can´t get it working.
DateTimeFormatInfo.FirstDayOfWeek Property (System.Globalization)
 
Last edited:
???

:confused:

for all those people who didn´t realize that this problem is not solved yet.
you can still post me an answer ;)

Thanks in advance
 
The computer culture doesn't depend on .Net, it is the other way around, .Net gets the culture info from the computer settings. I don't know about your reports, could they be hardcoded or something, or perhaps you can configure them? If you want your app to run as a different culture than the computer you could try this:
VB.NET:
Application.CurrentCulture = Globalization.CultureInfo.GetCultureInfo("de-DE")
 
Back
Top