Thanks! justify_interval is what I needed, I had never heard of it. I was
already prepared to deal with getting the years and multiplying by 12.
Topher
[]
On Jun 30, 2010, at 18:45 , Eliot, Christopher wrote:
> I need to read a timestamp from the database and turn that into an integer
> des
On Jun 30, 2010, at 18:45 , Eliot, Christopher wrote:
> I need to read a timestamp from the database and turn that into an integer
> describing how many months ago the event happened, rounding downward. The
> events are guaranteed to be in the past.
=# select timestamp '2010-06-26 00:00:00' -
I need to read a timestamp from the database and turn that into an integer
describing how many months ago the event happened, rounding downward. The
events are guaranteed to be in the past.
To start with, I tried subtracting a sample timestamp as would be found in the
DB from my benchmark date