Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: statalist-digest V4 #4311
From 
 
Maarten Buis <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: RE: statalist-digest V4 #4311 
Date 
 
Fri, 21 Oct 2011 16:16:07 +0200 
On Fri, Oct 21, 2011 at 3:31 PM, Mark McCann <[email protected]> wrote:
> Hello all,
>
>                I'm at a loss as to what's happening here. I have checked the help files and statalist, but I just can't make sense of this. My time variable appears to be reading seconds incorrectly, this happened before I added a dummy ":00" seconds onto the string variable, and after (as below). Any ideas on what is happening? I'm using Stata 11 on Windows
>
>
> gen space=" "
> gen seconds=":00"
> egen time1=concat(date space time seconds)
> gen time2=clock(time1,"DMYhms")
> format time2 %tc
replace 4th line to:
gen double time2 = clock(time1, "DMYhms")
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/