hi all,
I recently installed -nsplit- in order to split a numeric variable into two segments. the first part of the variable is the date I am interested in and the second part is a time (not interested in)
example: the variable labdate is in the form : "26mar2009 10:46:00" and is numeric so substr wont work. I want to isolate the 26mar2009 portion in %td format using -nsplit labdate,digits ( x x) gen(y y)- I cant seem to get this to work.
I dont really want to convert labdate into a string variable then proceed since my dataset is HUGE.
any thoughts?
thanks
Vishal
I recently installed -nsplit- in order to split a numeric variable into two segments. the first part of the variable is the date I am interested in and the second part is a time (not interested in)
example: the variable labdate is in the form : "26mar2009 10:46:00" and is numeric so substr wont work. I want to isolate the 26mar2009 portion in %td format using -nsplit labdate,digits ( x x) gen(y y)- I cant seem to get this to work.
I dont really want to convert labdate into a string variable then proceed since my dataset is HUGE.
any thoughts?
thanks
Vishal
Comment