Page 1 of 1

Only need first 2 digits of a zip code

Posted: Tue Dec 07, 2010 4:11 am
by Alex_vandeminne
Dear all,

I want to generate a seperate variable which only contains the first two digits of an already given postcode (Dutch for zip code). For example: a case has '1017 AA' for the variable 'postcode', but needs a seperate variable (let's call it 'postcode_2') '10'. I usually do this in Excel (Data > text to columns), but there are 1.7 milion cases (too big for clipboard). Is there a way to generate this in Eviews?

Thank you,
Alex

PS: using eviews 6

Only need first 2 digits of a zip code

Posted: Tue Dec 07, 2010 6:57 am
by EViews Gareth
Series firsttwo = @Val(@left(postcode,2))