Hi. In a django project we are pulling the date from a user input field using the strptime function, which is the only way I knew how to do that. Like so:
Code:
try:
start_date = strptime(request.GET["date_range_start"], '%m/%d/%Y')
except ValueError:
....
try:
end_date = strptime(request.GET["date_range_end"], '%m/%d/%Y')
except ValueError:
...
But the values returned by this func apparently cannot be compared using the <> operators. What is the equivalent way of doing this using the date class? Or how do I translate the struct_time values into a date object?