Re: Need to omit time during weekends from age calculations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: David Gauthier <davegauthierpg(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need to omit time during weekends from age calculations
Date: 2021-06-07 19:39:15
Message-ID: 983171.1623094755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Conway <mail(at)joeconway(dot)com> writes:
> On 6/7/21 3:12 PM, David Gauthier wrote:
>> I'd like to get the "age" difference between two times which span either
>> all or part of a weekend but exclude any time that transpired during the
>> weekend.

I'm a bit suspicious of this problem statement. I doubt there are many
practical applications where you wouldn't also wish to exclude holidays,
for somebody's definition of holidays. Of course, that makes it a lot
messier since you need a source of data for that.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2021-06-07 19:45:38 Re: Need to omit time during weekends from age calculations
Previous Message Joe Conway 2021-06-07 19:34:56 Re: Need to omit time during weekends from age calculations