I want to get current day for now. Only day. For example today is 20-March i need use it in my queryset
query = self.filter(Q(busyrooms__end_date__day=datetime.now().date()),
Q(reservedrooms__end_date__day=datetime.now().date()))
Tried to use datetime.now().date()
but i got error
TypeError: int() argument must be a string, a bytes-like object or a number, not 'datetime.date'
You can get the current day from datetime_obj by accessing the day
attribute of datetimeobj like datetime.now().day
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