On Wed, Mar 13, 2013 at 5:38 PM, Mani Subramani <subra010@umn.edu> wrote:
> I am trying to parse a date-string that is currently in one variable
> with format "yyyy-mm-dd-hh-ss"
Why not use -split-
clear
input str19 opendate
"2012,9,18,13,21,12"
"2012,9,18,10,51,33"
"2012,9,22,16,23,48"
"2012,10,29,14,59,52"
"2012,10,21,23,57,29"
"2012,10,22,20,10,23"
end
split opendate, parse(,)
l
Scott
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/