Skip navigation
digyabooty
Currently Being Moderated

Help calculation problem Javascript multiple if/else statements

Jul 16, 2012 8:14 PM

I am trying to create a form for a work schedule. I have two fields "time in" and "time out" and the third field is the total hours field - all in military time. And I want to calulate if the difference between the times is less than 6 hours then no break, if 7 hours then 30 minute break (minus 0.5 hours), and if greater than 8 hours then one hour lunch. So the total hour field of a shift from 1200 to 2100 is 8 hours.

 

Thanks in advance

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points