Re: [GENERAL] skip weekends: revisited

2005-03-14 Thread Jeff Amiel
Andre Maasikas wrote: From the looks of it, variable date seems to calculate the first day of a week and for it to work day_of_the_week has to start from 0 so Sunday - 0, Friday - 5 (in US at least?) Andre That appears to be the case (0 is sunday.) thanks for the assist!! -

Re: [GENERAL] skip weekends: revisited

2005-03-14 Thread Andre Maasikas
Jeff Amiel wrote: Back in 2002, Jean-Luc Lachance gave a nifty algorithm (http://archives.postgresql.org/pgsql-sql/2002-06/msg00301.php) for determining the resulting date given a starting date and number of 'workdays' in the future. The trick was that weekends (Saturday and Sunday) could not

Re: [GENERAL] skip weekends: revisited

2005-03-14 Thread Shachar Shemesh
Jeff Amiel wrote: Back in 2002, Jean-Luc Lachance gave a nifty algorithm (http://archives.postgresql.org/pgsql-sql/2002-06/msg00301.php) for determining the resulting date given a starting date and number of 'workdays' in the future. The trick was that weekends (Saturday and Sunday) could not

[GENERAL] skip weekends: revisited

2005-03-14 Thread Jeff Amiel
Back in 2002, Jean-Luc Lachance gave a nifty algorithm (http://archives.postgresql.org/pgsql-sql/2002-06/msg00301.php) for determining the resulting date given a starting date and number of 'workdays' in the future. The trick was that weekends (Saturday and Sunday) could not be counted. The a