Search Postgresql Archives

Re: Temporal Units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux