Skip to content Skip to sidebar Skip to footer

Django Date Format Issue - Does Not Match Format

I need to change the date into the format MM/YY. The issue is I don't always don't what the date format is to begin with. It's my understanding that the code below would need to kn

Solution 1:

newdate = datetime.datetime.strptime(str(mydate), '%Y-%m-%d').strftime('%m/%Y')

Post a Comment for "Django Date Format Issue - Does Not Match Format"