Solved

# determining number of hours between two times

Posted on 2004-03-26

i have the following start date and end date variables in a form:

startdatemonth - (values are 1-12)

startdateday - (values are 1-31..depeding upon the month)

startdateyear - (values are 2004 - 2010)

starttimehour - (values are 6, 6.5, 7, 7.5, 8, 8.5, etc.)

starttimeamorpm - (values are am/pm)

ex. 3/26/2004 8.5 am

enddatemonth - (values are 1-12)

enddateday - (values are 1-31..depeding upon the month)

enddateyear - (values are 2004 - 2010)

endtimehour - (values are 6, 6.5, 7, 7.5, 8, 8.5, etc.)

endtimeamorpm - (values are am/pm)

ex. 3/26/2004 5 pm

i basically want to determine the number of hours in between these two dates.

so for above example it should be 8.5 hours (where 8.5 above means 8:30)

how to do this?