troubleshooting Question

C#: Calculate the difference between 2 times

Avatar of NerishaB
NerishaBFlag for South Africa asked on
6 Comments1 Solution500 ViewsLast Modified:

I have 2 DateTiime fields, ClockTime, and DefaultStartTime.

The ClockTime is the actual time a person clocked into the office, and the DefaultStartTime is the time that work actually starts for the day.  The fields are as follows:

ClockTime                                 DefaultStartTime
2011/04/01 07:35:23                2011/04/03 08:00:00

Now, even though the Date of ClockTime and DefaultStartTime are different, I actually dont want to take the dates into consideration.  I just want to calculate the difference between the times ie. 08:00:00 - 07:35:23.  Can anyone help?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros