I'm getting a validation error when trying to store a date time in a django DateTimeField.
The format I'm trying to save is below, together with the error. :
django.core.exceptions.ValidationError: ["'Mon, 23 May 2016 08:30:15 GMT' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][T
In my django settings I have:
DATE_INPUT_FORMATS = ("%d %b %Y", )
Should I be converting the format before saving or can I add to DATE_INPUT_FORMATS
Django references: DateTimeField
Here's the answer: StackOverflow Answer Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With