|
-
Sep 2nd, 2005, 06:54 AM
#1
Thread Starter
New Member
How to calculate time difference
Hello,
For a project I am working on right now I need to be able to calculate the
time difference between to given times (24 hour format) and two given dates
For example:
Case 1: On the same date
The difference between 11:30 28/09/2005 and 14:45 28/09/2005 being 03:15
Case 2: On different date
The difference between 21:30 28/09/2005 and 10:45 29/09/2005 being 13:15
Right now the input is setup as 5 text boxes (dateup, datedown, timeup, timedown, totaltimediff). Is it possible to use that configuration and somehow get the time
difference? The goal is to be able to enter the the date and time values and immediately see a calculated difference in a totaltimediff textbox.
I'm thinking the scenario is like this:
1. User enter date up in first text box(dateup) - 28/09/2005
2. User enter date down in second text box(datedown) - 29/09/2005
3. User enter time up in third text box(timeup) - 21:30
4. User enter time down in fourth text box(timedown) - 10:45
5. Onchange of fourth text box, the duration is calculated and result is inserted into fifth text box (totaltimediff).
I'm not sure if/how to bet do this.
Thanks,
Rizad Muhammad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|