Click here to Skip to main content
15,888,527 members
Articles / Web Development / ASP.NET

How i convert dataetime to int and string to Int

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Jan 2013CPOL 4.5K  
DateTime datenow = DateTime.Now;int age=0;age =Convert.ToInt32(ddlyear.SelectedItem.Text).ToString();int result = 0;result =Convert.ToDateTime(datenow).ToString() - Convert.ToInt32(age).ToString();txtage.Text = result.ToString();

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions