Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F24A447592C for ; Sun, 27 Oct 2002 13:21:37 -0500 (EST) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 5A0704753A1 for ; Sun, 27 Oct 2002 13:21:37 -0500 (EST) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1800983; Sun, 27 Oct 2002 10:23:21 -0800 From: "Josh Berkus" Subject: Re: datediff? To: Erwin Moller Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Sun, 27 Oct 2002 10:23:21 -0800 Message-ID: In-Reply-To: <3.0.6.32.20021027185806.0085daa0@pop.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/365 X-Sequence-Number: 10082 Erwin, > I read your FAQ: Working with Dates and Times in PostgreSQL with > interest > and was wondering if somebody came up with those datediff and dateadd > functions? > I couldn't find any at techdocs.postgresql.org. I know somebody worked on one. I take it you read the articles on SQL Server ---> PostgreSQL conversion? The problem, as I recall, was one of quoted identifiers. That is, for datediff, you do: DATEDIFF ( m, date1, date2 ) whereas a postgresql function would have to say DATEDIFF ( 'm', date1, date2 ) I don't know if anyone ever worked out a way around this minor problem. -Josh