--On Wednesday, March 26, 2003 08:50:36 -0800 Josh Berkus <[EMAIL PROTECTED]> wrote:

Larry,

I had a need that should(!) be in the archives.  Just to reiterate my
need:

I input a contract length, in months, and wanted to get it back out as
months.  There is no current way to do this, so I store it as an INT and
concatenate the word months to do the
date arithmetic.

What about EXTRACT(months FROM <interval_field>)?


This annoyingly wraps around if it's more than 12 months, but that was
part of  my proposal ...
I needed like 5 years (60 months)...

So, the wrap around is not good in this case.

Thanks, though.



-- Josh Berkus Aglio Database Solutions San Francisco



-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to