AnsweredAssumed Answered

calculate date-field with python

Question asked by eggmar on Sep 26, 2012
Latest reply on Sep 26, 2012 by eggmar
Hi. I have a string-field (called 'unsplit') which contains concatenated values from other fields separated by a comma (example: 24.07.2010,street,...). I want to split/extract each commaseparated value and calculate it to a new field. I am using the field calculator and a pythonexpression. This expression works fine to calculate the value 'street' to a string-field: '!unsplit!.split(',')[1]
However, i can't calculate the value 24.07.2010 to a date-field using this expression: '!unsplit!.split(',')[0]
The error message is: <type 'exceptions.SyntaxError'>:EOL while scanning string literal.
What is wrong?