[EpiData-list] Entering time and date for outbreaks
epidata-list at lists.umanitoba.ca
epidata-list at lists.umanitoba.ca
Mon Feb 26 00:24:27 CST 2007
Hello Chrsitine,
I prefer to enter times as a decimal field, i.e. ##.##. I can then put
checks in place to make sure the minutes are in correct time format e.g. IF
Frac(vtime) > 0.59 THEN ....
Based on this decimal 24 hour time format, I have a formula which you can
use to calculate the difference in hours between two time and date
combinations.
Assume that your first time and date are vtime1 and vdate1, and your second
time and date are vtime2 and vdate2:
First calculate the number of hours (since 31st December 1899) for both time
and date combinations (store them as vhours1 and vhours2) using the
following formulae:
vhours2=Int(vtime2) + (Frac(vtime2)/0.6) + (vdate2*24)
vhours1=Int(vtime1) + (Frac(vtime1)/0.6) + (vdate1*24)
And then you can just calculate the time difference /incubation period into
a different variable!
timediff=vhours2-vhours1
You could also have done something similar and perhaps simpler using
EpiData's Time2Num function which will convert a decimal time into a number
between 0 and 1 representing a fraction of a day - I just prefer to work
with hours.
To explain the hours calculation formula for you (only need to read below if
you care how the formula works):
Int(vtime) takes the integer part of the time, and Frac(vtime) takes the
fractional part of the time. These are separated so Frac(vtime) alone can be
converted from minutes into fraction of an hour (e.g. from 0.30 to 0.50).
The date integer (representing the number of days since 31 Dec 1899) is then
multiplied by 24 to get the number of hours since 31 Dec 1899. This
1899 date is relevant only because it is how EpiData stores the date as an
integer - we do not have to worry about this because we only care about the
difference between the two dates.
Hope this helps!
Charity
Charity Jenkins
Data Processing Officer
Centre for Behavioural Research in Cancer
The Cancer Council Victoria
http://www.cancervic.org.au/cbrc<https://webmail.accv.org.au/exchweb/bin/redir.asp?URL=http://www.cancervic.org.au/cbrc>
On 2/26/07, epidata-list at lists.umanitoba.ca <epidata-list at lists.umanitoba.ca>
wrote:
>
> Hello everyone
>
> I am after advice about the best way to record time and date
> information when collecting information about food poisoning outbreaks,
> given epidata does not have a time/date field. We want this information
> to estimate incubation periods, in order to get clues about the likely
> illness.
>
> Incubation
> Incubation = time from when someone is exposed to the time they become
> unwell.
> For example someone may eat a buffet meal at 7pm on 21 February and
> become unwell at 1am on 22 February = incubation of 6 hours.
>
> Current method
> At the moment we:
> a) enter information in two fields. OnsetDay is recorded in a date
> field, and onsettime in a numeric field (####)
> b) list the two fields (using epi info) to view the information
> c) calculate incubation manually.
>
> Is there a better/easier way to do this? Also what is the recommended
> way for entering 24 clock time - should 7.30pm be 1930 or 19.30
>
> thanks very much
>
> Christine
>
>
>
> Christine Roseveare
> Analyst
> Regional Public Health
> 570 9194
> 027 495 9671
>
>
>
>
> --
> The information contained in this email and
> any attachments is confidential and may be
> legally privileged. If you have received this
> message in error, please notify the sender
> immediately and remove all copies of the message,
> including any attachments. Any views or
> opinions expressed in this email (unless
> otherwise stated) may not represent those of
> Hutt Valley DHB.
> Thank you.
> ** Disclaimer added by HVDHB **
>
> _______________________________________________
> EpiData-list mailing list
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>
More information about the EpiData-list
mailing list