Participating Frequently
October 18, 2024
Answered
Java Script - Duration between two times
- October 18, 2024
- 1 reply
- 1039 views
Hello,
I am absolutely clueless when it comes to JavaScript, I have been down a Google rabbithole but anything i find doesn't work. I have a form i want to fill in with a start time and finish time then a column that calculates how many hours between the 2 times. I have got close but not minutes not showing correctly i.e. 8hrs 30mins is howing as 8.30 instead of 8.5. My start and end times are formatted to HH:MM. Is there also a way i can ensure the input for the start and end times is in 24hr as i don't want someont to put 12:00 - 01:00 instead of 12:00-13:00. I was thinking of doing a drop down box in 15 minute increments, but there may be a better way. Thank you!
