Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Problems with execution of conditional branching..


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Problems with execution of conditional branching..
Date   Wed, 13 Mar 2013 20:02:10 -0500

On Wed, Mar 13, 2013 at 5:38 PM, Mani Subramani <[email protected]> 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index