Re: Formatting intervals..

Поиск
Список
Период
Сортировка
От Tomasz Myrta
Тема Re: Formatting intervals..
Дата
Msg-id 3E75DC7A.80200@klaster.net
обсуждение исходный текст
Ответ на Re: Formatting intervals..  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Список pgsql-sql
Uz.ytkownik Rajesh Kumar Mallah napisa?:
> 
> Yes i realize what your are saying.
> its not a valid calculation. 
> 
> actually my original problem is
> that i have to display this duration
> in a human friendly way in my website.
> 
> shud i divide by 30 and tell the customer
> that its approximate ? 
> 
> but even that sounds amatuerish to me.
> hope i will be able to explain the marketing 
> guys ;-)
> 
> 
> 
> regds
> mallah.

What about this:
select age('1970-1-1'::date+your_interval,'1970-1-1'::date);

It should give you best result - the answer is true in 75% cases 
(depending on year)

Tomasz




В списке pgsql-sql по дате отправления:

Предыдущее
От: Christoph Haller
Дата:
Сообщение: Re: Formatting intervals..
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: Formatting intervals..