Get Next date based on textbox entry days

Last Reply on May 16, 2016 02:36 AM By Shashikant

Posted on May 13, 2016 10:55 PM

Hai all,

i have 3 textboxes - Txtcurrntdate,Txtdays, TxtNxtDate

in TxtCurrntdate i select currntdate or previous or next day date, after entering days in txtcurrntdate i want add those days in to currnt date
textbox and i want  automatically get nextdate in TxtNxtDate.

if any body understand my query please help me

 

Thanks in advance

Posted on May 16, 2016 02:36 AM

Hi,

Please refer below code.

C#

DateTime date = DateTime.Parse(TxtCurrntdate.Text);
int days = 60;
DateTime nextDate = date.AddDays(days );

I hope this will help you out.