From: | Lew <lew(at)nospam(dot)lewscanon(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Temporal Units |
Date: | 2007-05-03 00:26:52 |
Message-ID: | IJCdnRD0HqfQsaTbnZ2dnUVZ_j-dnZ2d@comcast.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
John D. Burger wrote:
>> There was a brief discussion of this just last week, with a few solutions
>> suggested:
>>
>> http://archives.postgresql.org/pgsql-general/2007-04/msg01098.php
Rich Shepard wrote:
> That thread asked how to find business days between any two specified
> dates. I would like to create a calendar table that includes business days,
> holidays, Julianized dates, and other interesting tid-bits that are of
> value
> in a business application. Then dates can be looked up in the table to
> learn
> their attributes and the calculations don't need to be done each time.
The best solution I've encountered so far to this type of problem is to have a
table of "days" with columns like isWeekday, isHoliday, julianDay,
otherTidbit, ...
Then you select or join the days within the interval of interest and factor
out weekdays, or holidays, or whatever.
--
Lew
From | Date | Subject | |
---|---|---|---|
Next Message | Islam Hegazy | 2007-05-03 01:30:10 | C functions under windows |
Previous Message | Steve Atkins | 2007-05-02 23:16:54 | Re: Utility of OIDs in postgres |