Re: [GENERAL] More straight forward method to convert seconds::bigint to interval

2009-09-23 Thread Shane Spencer
Well worth joining the list. Thanks guys. On Wed, Sep 23, 2009 at 12:48 PM, Adam Rich wrote: > Shane R. Spencer wrote: >> >> I work in VoIP.  HMS (Hour/Minute/Second) format appears to be the rule >> when working with call time totals.  I admit it makes some reports >> easier to read. >> >> The

Re: [GENERAL] More straight forward method to convert seconds::bigint to interval

2009-09-23 Thread Adam Rich
Shane R. Spencer wrote: I work in VoIP. HMS (Hour/Minute/Second) format appears to be the rule when working with call time totals. I admit it makes some reports easier to read. The method I used to convert a int/bigint to HMS (or the standard representation of an interval type) is as follows:

Re: [GENERAL] More straight forward method to convert seconds::bigint to interval

2009-09-23 Thread Tom Lane
"Shane R. Spencer" writes: > Is there a less string oriented method of converting seconds as an int > to an interval? Multiply by an interval, eg 123456.789 * interval '1 second' It works, it's fast, and you can use any scale factor you want. regards, tom lane

[GENERAL] More straight forward method to convert seconds::bigint to interval

2009-09-23 Thread Shane R. Spencer
I work in VoIP. HMS (Hour/Minute/Second) format appears to be the rule when working with call time totals. I admit it makes some reports easier to read. The method I used to convert a int/bigint to HMS (or the standard representation of an interval type) is as follows: select (123456.789::varch