I need to implement a query to find the update time of the current day. How to use django orm to find it
reply_list = CusQuestions.objects.filter(is_deleted='f', crt_tm ????).order_by('-crt_tm')
This is crt_tm. I don’t know how to match the date to the current day
PHP中文网2017-06-15 09:23:51
Depending on what type your crt_tm is, you can use the following conditions for DateTimeField and DateField types
crt_tm__gte=datetime.datetime.now().date()
If the timestamp is saved, it will be easier to handle, there is nothing to say