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 inte
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
Thanks, that worked. I actually initialized it to zeros (so that my
incrementing would work).
Thanks for the example. I wouldn't have figured out to put quote marks
around the initialization value otherwise.
Topher Eliot
[EMAIL PROTECTED]
[]
--
Sent via pgsql-general mailing list (pgsql-gener
. I don't
understand what I would do "by hand" that would help this.
Topher Eliot
[EMAIL PROTECTED]
[]
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 15, 2008 12:30 AM
> To: Eliot, Christopher
> Cc: pgsql-general@postgresql.o
I have to count up a whole lot of things in a hurry. But in counting
them, I have to do a bit of analysis on each.
Each goober that I'm counting can be considered to have four
characteristics. The first three are binary: it's either male or
female, rich or poor, strong or weak. The last charac