pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Erwin Moller <erwin@dexus.nl>
Cc: pgsql-sql@postgresql.org
Subject: Re: datediff?
Date: Sun, 27 Oct 2002 10:23:21 -0800
Message-ID: <web-1800983@davinci.ethosmedia.com> (raw)
In-Reply-To: <3.0.6.32.20021027185806.0085daa0@pop.xs4all.nl>

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




view thread (2+ messages)  latest in thread

Message-ID: <web-1800983@davinci.ethosmedia.com>
Permalink:  ../web-1800983@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-1800983@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, erwin@dexus.nl
  Subject: Re: datediff?
  In-Reply-To: <web-1800983@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox