string variables

  1. L

    Numeric data become String data when transferred from excel to spss?!

    So I had some data from excel and I wanted to import it into SPSS to carry out T test. it looks like this on excel. perfectly fine percentage data however when it was imported to looks like this it became string data and i dont know what happened. all the percentages are gone...
  2. J

    string value too long

    I am recoding a lot of string variables using syntax. Many of the values (answers people have given to questions) are too long according to spss- it says I need to restrict the line length to 251bytes. but if i split it into 2 lines on the syntax then it doesn't recognise that this is one string...
  3. S

    Multiple encode commands with foreach

    So I have a bunch of string variables that cannot be destringed and encode does the job. However, I have many and found this code especially compelling since it uses the names of the other variables so I don't have to do a lot of renaming. However I hit a snag; I get an error from this telling...
  4. M

    Group categories in a string variable based on first letters

    Referral_Serv Childcare 3 School 4 other:foster 2 othersocial 1 otherHousing 1 I would like to group all the "other" categories into only ONE "other". Anyone? thanks!
  5. L

    Functions for calculating time between 2 variables

    Hello, I have a large data set, and, in the data set, there are a number of dates entered as string variables (e.g., 05SEP2012). I need to determine the length of time in years between some of these variables (e.g., from 20MAR1969 to 05SEP2012), but can't seem to figure it out. I have...