Statalist


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

st: RE: option generate() not allowed


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: option generate() not allowed
Date   Thu, 11 Sep 2008 15:52:28 +0100

This looks like correct syntax to me as of Stata 10.1 -- and indeed all
previous versions of -tostring- that I can recall. 

A different issue is that -tostring- with dates and without options is
unlikely to do what you want. You say nothing about what you want, but I
doubt it is what -tostring- does to dates by default. 

For example, if your variable contains today's date as a value then the
string equivalent is "17845". 

Nick 
[email protected] 

Fabian Brenner


tostring date, generate(date_as_string)

leads to:

option generate() not allowed
r(198);

what is wrong? 

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



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