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]

AW: st: AW: extract hours, minutes and seconds from date


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: AW: extract hours, minutes and seconds from date
Date   Fri, 21 May 2010 11:28:59 +0200

<> 

" 
The original time variable is stored as a double (%tc) and ideally I
would not like to transfer it to a string variable."


Well, use Maarten`s solution then. In your original post, you requested
"08:50:00" which won`t happen for a numeric variable. You can have the
parts, of course, just as Maarten showed.


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von raoul reulen
Gesendet: Freitag, 21. Mai 2010 11:22
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: AW: extract hours, minutes and seconds from date

Thanks Martin

The original time variable is stored as a double (%tc) and ideally I
would not like to transfer it to a string variable.
*
*   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