0

i have two textbox..TimeInTextbox that contains time in for example(8:00 am) and TimeOutTextbox that contains time out for example(5:00 pm), i want to add TimeInTextbox and TimeOutTextbox to get the total working hours but how am i suppposed to do that?

4
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by Icone
0

The above response merely displays the current date and time. To calculate the difference between two date/time values you do the following:

txtTimeWorked.Text = DateDiff(DateInterval.Minute, CDate(txtTimeIn.Text), CDate(txtTimeOut.Text))

Assuming that the two fields used in the calculation both contain valid date/time values, it returns the elapsed time in minutes (in the event you want to allow credit for partial hours).

0

Is there an hour attribute in the DateInterval? Because he said he want to get the hours rendered.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.