hello my friends ... in C# Forms ( application form)
my question is about the (DateTimePicker)
is there any way to calculate the days between two different times which were entered by the tool DateTimePicker by an existing method or something else ...
thank you in advance
Alicito
27
Light Poster
Recommended Answers
Jump to PostUsing 2 datetime pickers you can get the timespan between them
TimeSpan ts = dateTimePicker2.Value - dateTimePicker1.Value; MessageBox.Show(ts.ToString());
To do what you're suggesting would probably take the user putting in one of them to the DTP, hitting a button to lock the value into one DateTime object, …
All 3 Replies
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Alicito
27
Light Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.