how to find day name from given date for current year?

17,423

Solution 1

You can find birthdate in this year like;

var birthDate = new DateTime(1983, 10, 21);
var thisYear = new DateTime(DateTime.Today.Year, birthDate.Month, birthDate.Day);

var dayOfWeek = thisYear.DayOfWeek; // it gives you day of week of birth day in this year

Solution 2

Just use DateTime.DayOfWeek

Solution 3

Use

    string day = DateTime.Now.DayOfWeek.ToString();
Share:
17,423
Priyanka
Author by

Priyanka

I'd completed my graduation in B.Sc.(Computer Science) & Completed my post graduation in MCA. From last 6 months i'm working as a .NET software engineer in GS. I'm C# programmer. Right now i'm working on one project named MsgBlaster 4.0 which will be another version of earlier software MsgBlaster 3.0 which is message sending s/w from PC to mobile. It not required any mobile device or SMS modem connectivity with PC. And i like to use Stackoverflow when i stuck with any problem related to my project & it helps me a lot... thanks.

Updated on June 14, 2022

Comments

  • Priyanka
    Priyanka almost 2 years

    I have the birth date from particular year, i want to find the day name of that birth date for current year.

    how to do this?