Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: how to code for a 5-hour delay

From   Nick Cox <>
To   "" <>
Subject   Re: st: how to code for a 5-hour delay
Date   Mon, 10 Feb 2014 16:42:51 +0000

This is a bit difficult to follow, but a difference in date-times is
itself an elapsed  time, not a date-time.

If -clock()-  was used to compute date-times, the results in
milliseconds need to be divided by 60 * 60 * 1000 to get a result in


On 10 February 2014 16:19, Dao Kim <> wrote:
> Hi, I need help to write a command to select patient that received a drug in the 5 hours following the first one. I have time1 (1st drug administration) and time2 (2nd drug administration). I created a cat with delay (time2-time1), which has the 1 jan 1960, I don't really know how to change that, still it's not the matter. I would like to keep only the patients for how delay is < or = to 5 hours, should I write 5 hrs in a SIF time? How do I convert? Didn't work so far. Thanks for your help. Kim
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index