Re: [GENERAL] Date / interval question

2008-04-11 Thread A. Kretschmer
am Thu, dem 10.04.2008, um 21:26:14 -0600 mailte kevin kempter folgendes: > I can get the number of days since the start of the fiscal year like > this: > > # select date '01/01/2007' - date '09/01/2006' as interval; > interval > -- > 122 > (1 row) > > However I'm stumped [er h

Re: [GENERAL] Date / interval question

2008-04-11 Thread Rodrigo E. De León Plicet
On Thu, Apr 10, 2008 at 10:26 PM, kevin kempter <[EMAIL PROTECTED]> wrote: > However I'm stumped [er how to get the number of months from 09/01/2007 > thru 01/01/2007 select extract(month from (age(date '2007-1-1', date '2006-9-1'))); -- Sent via pgsql-general mailing list (pgsql-general@postgr

[GENERAL] Date / interval question

2008-04-10 Thread kevin kempter
Hi List; I'm populating a time dimension. I need to get the number of days since the start of the fiscal year and also the number of months since the start of the fiscal year based on the current 'date' being processed. Example: my current process date is 01/01/2007 start date of fiscal