i am making a calendar app. When i write this in my code DateTime.Now.DayOfWeek
i get the current day (Monday), but how can i change it so it writes "Monday" on a different language (e.g. Norwegian)?
The same problem goes of course for the months too.
Asked
Active
Viewed 754 times
0

Korg naw
- 1
1 Answers
0
var culture = new System.Globalization.CultureInfo("nb-NO");
var day = culture.DateTimeFormat.GetDayName(DateTime.Today.DayOfWeek);

Daahrien
- 10,190
- 6
- 39
- 71

Taras Kovalenko
- 2,323
- 3
- 24
- 49
-
Thank you very much! You saved my day :) – Korg naw Jul 03 '17 at 09:04
-
1How ever "de-DE" gives you Danish, not norwegian, but found out that "nb-NO" is norwegain [link](https://msdn.microsoft.com/en-us/library/cc233982.aspx), here you can see the different languages and thier tag – Korg naw Jul 03 '17 at 09:06