[EpiData-list] Using time

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Nov 23 15:44:19 CST 2009

The answer is different for Entry and Analysis and depends on how you 
have coded time.
Entry has check functions for handling time coded as a floating point 
number (hh.mm - e.g. 1:30 pm is 13.30) - these are described in the Help 
for adding validation and checks.

In Analysis, you can do the math, but the special functions are not 
there, so you have to take apart the time.

For time as hh.mm and variables start and finish:

durmin = int(finish) + 60*(finish-int(finish)) - int(start) - 60*(start 
- int(start))
* That's duration in minutes
durhr = durmin / 60.0
* That's duration in hours and fractions of an hour
duration = int(durhr) + 100*(durhr - int(durhr))
* That's duration as hh.mm

Jamie Hockin

Silvano wrote wrote:
> I have two variables that use the hours.
> One with the start time of surgery and another with the time of 
> completion of surgery.
> How do I get with the times and calculate the time of surgery.

More information about the EpiData-list mailing list