[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Date format
E. Paul Wileyto <[email protected]> writes,
> We have a lot of programming that is dependent on dates. Now when I run
> the ODBC import under version 10, I get this huge number in %tc format,
> instead of just the date, which I gather is now the %td format.
>
> Is there a quick conversion from a %tc value to a %td value that I can
> plug in to make all the old code work?
Assume variable x contains a %tc value, which is a date and time. You can
contain the corresponding %d value (which is a date) via
. gen date = dofc(x)
You could replace the values in x via
. replace x = dofc(x)
-- Bill
[email protected]
*
* 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/