I have a variable "date" that contains the date that a particular assay was run (the variable is in a data format). I would like to assign the date in a particular observation to a local macro variable (its the same date for all observations). Currently when it does this it assigns it a number in stata date format relative to Jan 1, 1960. Is there a way to assign it to the local macro variable in a way that it will formatted in a "readable" date format?
quietly sum date if tmp_dp ==`i'
local date = r(mean)
Thanks,
Susheel
-------------------------------------------------------------------
Susheel P. Patil, M.D., Ph.D.
Assistant Professor of Medicine
Johns Hopkins Sleep Disorders Center
Asthma and Allergy Center
5501 Hopkins Bayview Circle, Room 4B.41
Baltimore, MD 21224
Phone: 410-550-2335
Fax:410-550-3374
-------------------------------------------------------------------
*
* 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/