Sql Extract Year From Datetime In Python