Re: Regarding interval conversion functions and a seeming lack of usefulness
От | Alban Hertroys |
---|---|
Тема | Re: Regarding interval conversion functions and a seeming lack of usefulness |
Дата | |
Msg-id | E46962A9-3ABD-49CE-B512-111170CAAB9D@solfertje.student.utwente.nl обсуждение исходный текст |
Ответ на | Regarding interval conversion functions and a seeming lack of usefulness (Bill Moran <wmoran@collaborativefusion.com>) |
Ответы |
Re: Regarding interval conversion functions and a seeming lack of usefulness
|
Список | pgsql-general |
On Feb 27, 2008, at 3:47 PM, Bill Moran wrote: > Something like: > $ SELECT CONVERT('12 days 13 hours'::INTERVAL AS hour); > hour > ------ > 301 > $ SELECT CONVERT('6 hours 17 minutes'::INTERVAL AS hour); > hour > ------ > 6.2833 > > Am I approaching this problem wrong? or is there something out there > and my Google skills are lacking? One of the obvious problems with this is that you cannot convert months to something more fine-grained without knowing the date the interval is relative to. I mean, what would be the answer of: $ SELECT CONVERT('2 months'::INTERVAL AS days); This month that would be 60 days, next month 61, this month next year 59, etc. And I haven't even started on leap seconds and daylight saving time yet... Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,47c69dd2233091191611641!
В списке pgsql-general по дате отправления: