Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Time calculations


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Time calculations
Date   Wed, 20 Nov 2002 20:04:10 -0000

Jawad A. Al-Lawati
 
> I have two variable T1 (fasting time the night before 
> glucose test is done
> expressed as airport time e.g 22.00) and variable  T2 (time 
> when patients
> blood was tested for diabetes expressed as airport time but 
> was collected in
> the morning so does not matter if airport time is expressed 
> but it is in the
> format of 9.00).
> 
> Question: How do I calculate the time difference if between 
> the previous
> evening (when patients fasted and the next mooring when 
> patients were
> tested)
> 

gen diff = T2 + (24 - T1) 


Nick 
[email protected] 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index