Judy Deo
asked on
determining number of hours between two times
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?
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?
You need to use dateDiff("h", yourdate1here, yourdate2here)
ASKER
but in what format should "yourdate1here" and "yourdate2here" be? will it let me include the time part (i.e 7:30 am) ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks.
i forgot to ask one thing about the DateDiff function. i will ask it another question.
i forgot to ask one thing about the DateDiff function. i will ask it another question.