bdate
I want to gate diffrence of current date and birth date. Mens output like 24 years 2 hours 35 minute 2 second. Check above in each second.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hiren SoniPosted Jan 24, 2010, 9:37 PM
{
Timer T1 = new Timer();
T1.Start();
InitializeComponent();
T1.Tick += new EventHandler(display);
}
private void display(object sender, System.EventArgs e)
{
// THIS CODE DISPLAY DIFFERENCE B'WIN BIRTHDATE AND CURRENT DATE
// AND TIMING ALSO
DateTime startDate = Convert.ToDateTime("01/01/1989 3:30:00 PM");
DateTime endDate = DateTime.Now;
TimeSpan ts = endDate.Subtract(startDate);
// DISPLAY VALUES TO THE TEXTBOXES...
txtDifference.Text = ts.ToString();
txtDays.Text = ts.Days.ToString();
txtHours.Text = ts.Hours.ToString();
txtMinutes.Text = ts.Minutes.ToString();
txtSeconds.Text = ts.Seconds.ToString();
txtMilliseconds.Text = ts.Milliseconds.ToString();
}