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

Re: st: Re: what time is it?


From   Elizabeth Allred <[email protected]>
To   [email protected]
Subject   Re: st: Re: what time is it?
Date   Fri, 27 Sep 2002 09:39:06 -0400

<snip>
> I agree that it might be nice in some situations to have a format that specified
> the exact time as well as the day.
> 
> //Jesper
> 
<more snip>

I hate to SAS you all, but what I'm looking for is this:

gen DATE=mdy(mon_var,day_var,yr_var)          we've got this in Stata
TIME=hms(hr_var,min_var,sec_var)              SAS code
DATETIME=dhms(DATE,hr_var,min_var,sec_var)    SAS code

As Kit noted, I need to be able to calculate the difference between two
date/time points and display it in a meaningful way which may include
hours, minutes and seconds.
*
*   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