Statalist The Stata Listserver


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

RE: st: Time labels


From   "Ferry, Danielle \(Exchange\)" <DFerry@bear.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Time labels
Date   Wed, 2 May 2007 17:30:26 -0400

Actually, for those interested, if "date" is %tm already:

local min: di %tm mofd(dofm(r(min)))
local max: di %tm mofd(dofm((r(max))

Thanks, Austin!

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Austin
Nichols
Sent: Wednesday, May 02, 2007 4:50 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Time labels

Something like this, perhaps?

sysuse sp500, clear
keep in 1/45
su date
local min: di %tm mofd(r(min))
local max: di %tm mofd(r(max))
tw rarea hi lo d , ti(`min' to `max')


On 5/2/07, Ferry, Danielle (Exchange) <DFerry@bear.com> wrote:
> Dear statalisters,
> Is it possible to access the label associated w/ a time variable
> formatted %tm? More specifically, I am generating a series of graphs
> that use the most recent set of data (time period varies depending on
> which variables I use), and I want to be able to display on the graph
> the label that specifies which time the data refers to (i.e., "2007m2"
> rather than "265").
> Many thanks.



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.

Bear Stearns does not provide tax, legal or accounting advice.  You
should consult your own tax, legal and accounting advisors before
engaging in any transaction. In order for Bear Stearns to comply with
Internal Revenue Service Circular 230 (if applicable), you are notified
that any discussion of U.S. federal tax issues contained or referred to
herein is not intended or written to be used, and cannot be used, for
the purpose of:  (A) avoiding penalties that may be imposed under the
Internal Revenue Code; nor (B) promoting, marketing or recommending to
another party any transaction or matter addressed herein.
***********************************************************************

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index