I have the same question regarding displaying only the month and day of the date.
This is a snip of the date field in ArcMap
I've tried this code:
from datetime import datetime
def FindLabel ( [StartDate] 😞
d = datetime.strptime([StartDate], '%m/%d/%Y %I:%M:%S %p')
return d.strftime('%d %m')
This is the error I am getting when I verify the expression. I read this so I know that the zero-padded date is not an issue..
Any insight on why the error is showing?