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

Re: st: querying format for programming

From   "E. Paul Wileyto" <>
Subject   Re: st: querying format for programming
Date   Thu, 06 Mar 2008 08:54:13 -0500

Thanks.  Third option is what I needed.


Maarten buis wrote:
--- "E. Paul Wileyto" <> wrote:

I need to convert the new date/time format (%tc) to the old standard (%td). However, I need to make sure I don't apply the conversion to non-%tc formats. (Bad things happen.) Is there a function that
queries a variable and returns the format (so that I can capture it
as a macro)?
First, did you know that you can save files in Stata8/9 format using
the -saveold- command?

Second, you can get a list of all variables with a certain format, to
be specified by you, using the -ds- command, see: -help ds-.

Third, you can get the format of a variable in a macro using extended
macro functions (in particular the extended macro function called -format-), see -help extended_fcn-.

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Sent from Yahoo! Mail.
The World's Favourite Email
* For searches and help try:

E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309

Fax: 215-746-7140
* For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index