Re: [GENERAL] Converting time to float

2007-04-27 Thread Jorge Godoy
Richard Huxton <[EMAIL PROTECTED]> writes: >> SELECT '00:10:00'::TIME / '1:00:00'::TIME; -- Answer is: >> 0.1667 > > But it doesn't make any sense to divide one time by another, does it? Are you > sure it's not intervals you want? It "doesn't matter", I just used time because I

Re: [GENERAL] Converting time to float

2007-04-27 Thread Richard Huxton
Jorge Godoy wrote: Hi! I am needing to convert from TIME type to floats and taking 1h as the unit, so what I'd like is something that would allow me doing operations like: SELECT '00:10:00'::TIME / '1:00:00'::TIME; -- Answer is: 0.1667 But it doesn't make any sense to divi

[GENERAL] Converting time to float

2007-04-27 Thread Jorge Godoy
Hi! I am needing to convert from TIME type to floats and taking 1h as the unit, so what I'd like is something that would allow me doing operations like: SELECT '00:10:00'::TIME / '1:00:00'::TIME; -- Answer is: 0.1667 SELECT '00:30:00'::TIME / '1:00:00'::TIME; -- Answer is: 0.