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

st: RE: option generate() not allowed

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

As Eva Poen correctly points out, the original (user-written) -tostring-
command did not have a -generate()- option. 

[email protected] 

-----Original Message-----
From: Nick Cox 
Sent: 11 September 2008 15:52
To: '[email protected]'
Subject: RE: option generate() not allowed

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

[email protected] 

Fabian Brenner

tostring date, generate(date_as_string)

leads to:

option generate() not allowed

what is wrong? 

*   For searches and help try:

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