Re: Averaging timestamp deltas with Django ORM

2022-09-15 Thread Joshua Corlin
Thank you, this is exactly what I was looking for -Josh On Wednesday, September 7, 2022 at 5:47:18 PM UTC-6 Thomas wrote: > Something like qs.aggregate(delay=Avg(F(“approved_at”) - > F(“created_at”)))[“delay”] > > where I cribbed the technique from > https://stackoverflow.com/questions/5021965

Re: Averaging timestamp deltas with Django ORM

2022-09-08 Thread Toshar Saini
Something like qs.aggregate(delay=Avg(F(“approved_at”) - F(“created_at”)))[“delay”] try this On Thu, Sep 8, 2022 at 5:16 AM Thomas Lockhart wrote: > Something like qs.aggregate(delay=Avg(F(“approved_at”) - > F(“created_at”)))[“delay”] > > where I cribbed the technique from > https://stackoverflo

Re: Averaging timestamp deltas with Django ORM

2022-09-07 Thread Thomas Lockhart
Something like qs.aggregate(delay=Avg(F(“approved_at”) - F(“created_at”)))[“delay”] where I cribbed the technique from https://stackoverflow.com/questions/50219652/django-queryset-get-avg-of-2-fields hth - Tom