To calculate difference between two DateTime Picker control( i.e User Entry)

Dec 13 2006 1:31 AM
Dear Sir,
 
I am encountering a problem and  needs your support .The details of the issue is mentioned below :
 
Environment details - Database : SQL Server 2000 ; ERP Version : Microsoft GP 9.0, Visual studio-2005.
 
Problem  Statement : How to calculate difference between two DateTime Picker controls( i.e User Entry) in terms of Hours and Minutes only. 

Problem Details:
 
1. We are having one C#  .Net Modular Screen where  there are several DateTime Picker Controls accepting Date and Time ( both)  in terms of TimeTO and TimeFROM.
 
2. The difference of Date and Time(both) from the  controls is being accepted by  their Textbox respectively.
 
3, But, difference of  DateTime Picker( i.e TimeTO and TimeFROM)  gives " Day: Hour: Min: Sec.  And , we want Difference in terms of Hours and Minutes only and all the difference will be finally added to get" Total Hours and Minutes".
 
4, We have used most of properties but not getting the same.
 
 
5. Please provide the .net C# code for window forms,   for the same or any other solution.
 
 
With Regards,
 
Naveen Kumar




Answers (5)