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: String task
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: String task
Date
Fri, 1 Apr 2011 11:56:30 -0400
Daniel Marcelino <[email protected]>:
clear
input str8 day
"01/06/90"
"07"
"02/01"
"30/01"
"10"
end
split day, p(/)
list
On Fri, Apr 1, 2011 at 11:51 AM, Daniel Marcelino <[email protected]> wrote:
> Hello all,
>
> I have I task with string that is split a string into two vars.
> So every character before first "/" slash if is there, must be copied
> to var1. Also, everything after "/" slash or if there is no "/"
> everything in the cell must be placed into var2.
> How can I do it?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/