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

st: RE: RE: hours and minutes help


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: hours and minutes help
Date   Mon, 1 Dec 2003 18:00:27 -0000

Correction 

> gen endtime2 = floor(endtime) + 100 * mod(endtime,1) / 60 
> gen starttime2 = floor(starttime) + 100 * mod(starttime,1) / 60 

Nick 
n.j.cox@durham.ac.uk 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Nick Cox
> Sent: 01 December 2003 17:52
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: hours and minutes help
> 
> 
> I wouldn't use -egenmore- here, as 
> an attack from first principles is more direct. 
> 
> gen endtime2 = floor(endtime) + mod(endtime,1) / 60 
> gen starttime2 = floor(starttime) + mod(starttime,1) / 60 
> gen lapse = endtime2 - starttime2 
> 
> Nick 
> n.j.cox@durham.ac.uk 
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index