Skip to content

How to set fix day and month but year is selected from cmbbo

Pooja Zol

Asked Feb 11, 2014, 2:34 AM EST2 answers
Share
LinkedInX
int year = Convert.ToInt16(cmbtoyear.SelectedItem.ToString());
            int month = 3;
            int day1 = 31;
    
            DateTime finaldate = new DateTime(month,day1,year);

it show error plz help to solve this.......

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Biswa Pujarini Mohapatra
    0
    you need to give in (year,month,day) format

          DateTime finaldate = new DateTime(year,month,day1);
    0
  • Biswa Pujarini Mohapatra
    0
    If you got your solution please mark it as answer
    0