Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Time without date


From   "Steichen, Thomas J." <[email protected]>
To   <[email protected]>
Subject   st: RE: Time without date
Date   Tue, 23 Oct 2007 18:10:07 -0400

If t is your time variable, then 

  gen seconds_today = 60*60*hh(t) + 60*mm(t) + ss(t)  

gets time in seconds since start of the day.

-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
 
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of mai mai
Sent: Tuesday, October 23, 2007 5:40 PM
To: [email protected]
Subject: st: Time without date

Hi,
I have a variable that is %tc, eg: (02jan2005 10:13:43) how can make
this variable composed of time only without the date. I don't want it
to include the standard date of 1960. I am doing this because I need
to average across time of many days second by second.

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

-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.   

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