How can I parse DateTime variables only year to Integer type?
I would like to parse DateTime variable (2008-06-08) to a integer type variable that would contain only year (2008)
I have tried converting DateTime to string and string parsing to int, but maybe there is a better way to do so?