The following approach should work: var1 = "GHXXXXX15" define var2 ##### var2 = integer(substr(var1,8,2)) means var2
Annemieke van Middelkoop Pretoria, South Africa
On 6/9/06, epidata-list@lists.umanitoba.ca epidata-list@lists.umanitoba.ca wrote:
Hello
How is it possible to convert a string to a numeric value in Epidata Analysis. I have tried all the proposed solutions found on the support list, but the result is always the same 'data type mismach" I have a string variable like
var1 = GHXXXXX15
And I want to make statitic(median, means ....) on the last part (15) , I can convert to a numeric value. The function to convert numeric to string exists, but no string to numeric.
Thank you very much
Yves Yves Dupont Institut of Public Health Rue Juliette Wijtsman 14 1050 Bruxelles Belgium Phone : 32 2 6425785 Fax : 32 2 6425410
########################################################### Checked as being free of known viruses.
Scientific Institute of Public Health, Brussels, Belgium Wetenschappelijk Instituut Volksgezondheid, Brussel, België Institut scientifique de Santé publique, Bruxelles, Belgique Visit our website: http://www.iph.fgov.be ########################################################### _______________________________________________ EpiData-list mailing list EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list