Re: datediff?

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Erwin Moller <erwin(at)dexus(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: datediff?
Date: 2002-10-27 19:49:16
Message-ID: web-1801028@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Erwin,

> Thanks for your quick response Josh.
>
> I wasn't aware of the Postgresql-function DATEDIFF()
> The accolade ' is not a problem of course!

Whoops! Didn't want to confuse you. What I meant was, a PgSQL
function "Datediff" could be easily *written*, except that it would
need quoted identifiers, different from the T-SQL function. If anyone
on this list has written a DateDiff, please post!

> But I have to say to my shame, I was asking you too soon, because all
> I
> really needed was a function that could return me some absolute
> timediff,
> and I found date_part('epoch', date) does the trick nicely enough for
> me.
> I can now take the diff in millisecs since start of epoch, which is
> enough
> to do all other calculations easily.

Cool! Glad that you found something that would work for you.

-Josh

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kabai Jzsef 2002-10-28 08:13:56 Accumulated sums in SQL query
Previous Message Josh Berkus 2002-10-27 18:23:21 Re: datediff?