Did you think of this logically? A month can have 4/5 same days (for e.g. lets say sunday); how would you know that user wanted the 1st sunday or the last sunday of the month.
For sure, you need to consider more parameters like week number etc.
With the likely code:
private DateTime GetDateBasedOnDay(string Pstrday)
{
DateTime LobjDate = null;
DateTime LobjToday = DateTime.Now.Date;
DayOfWeek LobjDayToday = LobjToday.DayOfWeek;
DayOfWeek LobjLookUpDay = (DayOfWeek)Enum.Parse(typeof(DayOfWeek), Pstrday);
while (LobjToday.DayOfWeek != LobjLookUpDay)
{
LobjToday = LobjToday.AddDays(1);
}
LobjDate = LobjToday.Date;
return LobjDate;
}