Statalist


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

Re: st: querying format for programming


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: querying format for programming
Date   Thu, 6 Mar 2008 13:50:58 +0000 (GMT)

--- "E. Paul Wileyto" <[email protected]> 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


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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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