Here we can get countdown timer, using below code:
'declare count variable
int cntr=0;
'get current date
DateTime today = DateTime.Now;
'get Target Date i,e ()
DateTime targetDate = Convert.ToDateTime("20/15/2012"); //
30 Days to Go
'get the difference date count
TimeSpan diff = targetDate - today;
cntr = diff.Days.ToString();
'show count
lblCountDownTimer.Text = cntr +' Days to go';
'declare count variable
int cntr=0;
'get current date
DateTime today = DateTime.Now;
'get Target Date i,e ()
DateTime targetDate = Convert.ToDateTime("20/15/2012"); //
30 Days to Go
'get the difference date count
TimeSpan diff = targetDate - today;
cntr = diff.Days.ToString();
'show count
lblCountDownTimer.Text = cntr +' Days to go';
Comments