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

st: preserving leading zeros in destring

From   Michael McCulloch <>
To   Statalist <>
Subject   st: preserving leading zeros in destring
Date   Wed, 27 Aug 2008 13:42:08 -0700

I want to destring a variable, which contains dates in the format 
"MM/DD/YY", using:
	destring date, replace ignore("/") force

How can I set this to preserve the leading zeroes, so that I can follow with:
	todate date, gen(newdate) pattern(mmddyy) f(%d)

Any suggestions would be much appreciated.


Best wishes,
Michael McCulloch

Pine Street Foundation
124 Pine St., San Anselmo, CA 94960-2674
Tel:	(415) 407-1357
Fax:	(415) 485-1065

*   For searches and help try:

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