Reputation: 3
Am getting this error while updating date field to null in Django." 'Null' value has an invalid date format. It must be in YYYY-MM-DD format". Please help me if any one knows the solution.
Code: if editBirthday: editBirthday=datetime.strptime(str(editBirthday),"%d-%m-%Y").strftime("%Y-%m-%d") loggedInUser.Birthday = editBirthday else: loggedInUser.Birthday = "Null"
Upvotes: 0
Views: 904