From: "Jeff Rhys-Jones" <jeff@emojo.com>
> Hi there. I was wondering if anyone can tell me the correct syntax for
> using DateDiff for postgrees. I'm using MI (or mi) for minute and I
> keep getting attribute 'mi' not found.
>
> I've looked at postgres.org and can't seem to find any ref. to using
> datediff.
You just subtract dates with PG:
select now() - CURRENT_DATE;
Will return an "interval" type with the elapsed time since midnight. If you
want that in seconds do:
select extract(epoch from (now() - CURRENT_DATE));
Converting to minutes is obviously easy from there.
I think datediff() is a MS-Access thing isn't it?
- Richard Huxton