This really shouldn’t be this hard but for some reason I can’t seem to get it.
I am trying to run a filter on my query that compares the date range between today, and the first day of next year.
Getting today is no problem, but I can’t seem to get the first day of next year. I want to be able to provide myself with Jan 1/2013
Here is my filter so far:
cur_il = Investment.objects.all().filter(plan = plan).order_by('financial_institution').filter(maturity_date__range=[now, nextyear])
Obviously I use this to get today’s date:
now = datetime.now()
How can I get the next date?
Does this work?