Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
DateTimePicker professional
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Israel
10y
581
1
Reply
Hi!
I need to get the exact age of each worker.
I do something very and very simple. Its works but it'snt professional.
On my form I put three textboxs with a button (txtCurrentYear, txtYearOfBorn, txtAge and btnAdd). Then see my code:
private void btnAdd_Click(object sender, EventArgs e)
{
float first;
float second;
float output;
first = Convert.ToInt32(txtCurrentYear.Text);
second = Convert.ToInt32(txtYearOfBorn .Text);
output = first - second;
txtAge.Text = output.ToString();
}
What I need to learn. I would like to use the "dateTimePicker" with a "label". Means when I choose a date on my DateTimePicker its should show on my "label" the age (ex. 39)
Thanx,
Israel.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Developer Certs.
Add and Remove Textbox to ListBox Items in JavaScript