Can anyone tell me how to print the week name rather than printing numbers in c#

Recommended Answers

All 5 Replies

What do you understand by a "week name"
"week1"
"week one"
"the first week" etc.
Please explain.

EG.SUNDAY....

DateTime.Now.DayOfWeek

string dayOfWeek = DateTime.Now.DayOfWeek.ToString();

For example, if you want to day written in your language, please fo something like this (the example show slovenian day):

string dayOfWeek = DateTime.Now.ToString("dddd", new CultureInfo("sl-SI"));
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.