Good day,I've been having some issues writing a python script for a Field Calculation. The code I've written: Pre-Logic Script Code:yyyy = !DATE_LCL![4:]:
dd = !DATE_LCL![5,6]:
if !DATE_LCL![7,9] = 'Jan':
mm = 01
elif !DATE_LCL![7,9] = 'Feb':
mm = 02
else:
mm = 99
end if
Field:yyyy + mm + dd
This script is desigend to take a string field (DATE_LCL) of a standardized date (ex. Thu 15Jul2010) and convert it to the following integer format: yyyymmdd. The current code is only coverting from the initial format to the new format while retaining the string data type. Eventually, I'll be converting it into a short int. While running the code, I get the 000989 error code which is an invalid syntax. While I have no doubt that my syntax is invalid, I'm sure my code has some more fundamental issues as well. Any help?