Answer the question
In order to leave comments, you need to log in
How to convert date to readable format for django queryset filtering?
How to convert a date in the Fri Oct 04 2019 00:00:00 GMT 0300 (Moscow, standard time) format, which comes as a string from the front (this is how the js plugin returns to the calendar) into a normal date that is well read in filtering?
Answer the question
In order to leave comments, you need to log in
Isn't it easier for the plugin to send a timestamp than trying to parse incomprehensible formats?
send date from js
Well, or in the end use the ISO format:
upon receiptdate = datetime.fromisoformat(date)
datetime.strptime(date, '%a %b %d %Y %H:%M:%S %Z 0300')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question