Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: AW: display minutes and seconds?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: display minutes and seconds?
Date   Wed, 25 Aug 2010 19:17:00 +0200

<> 



*************
clear*
set obs 1
gen str20 myvar="20/Jul/2010 11:34:53"
gen double mydate =clock(myvar, "DMY hms")
l
di in r %tcMonth_DD,_CCYY_HH:MM:SS mydate
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von B. Timothy
Walsh
Gesendet: Mittwoch, 25. August 2010 19:00
An: statalist@hsphsun2.harvard.edu
Betreff: st: display minutes and seconds?

I've read in some dates/times, and would like to be able to see not only 
month-date-year, but also hours:minutes:seconds. I think I can see how to 
extract these if I want to compose a string, but it would be useful to see 
such details in the data editor. Is there a way to format? (In looking for 
a solution, I'm starting to think not.)
I'm a novice STATA user, running STATA-11.
Thanks!
Tim Walsh
*
*   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/


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index