I have a database of wells and water level measurements which I would like to label in a stacked manner with the ID on top and the measurement below it. If the measurement is from 2020, it should appear normally but if it is from before 2020 I want to put the value in parentheses. It seems what I have written so far ignores the else part of the function (everything comes out normal). If I switch the >/< symbol, everything comes out in parentheses.
Does anyone know what I am doing wrong in ArcMap here?
def FindLabel ( [IDMINE], [Date], [Q1_2020_WL] ): if [Date] > 12/30/2019: return [IDMINE] + '\n' + [Q1_2020_WL] else: return [IDMINE] + '\n' + "(" + [Q1_2020_WL] + ")"