Timestamp vs. Interval and formatting....

Поиск
Список
Период
Сортировка
От Dan Jewett
Тема Timestamp vs. Interval and formatting....
Дата
Msg-id 20040104151117177662.GyazMail.dan@thenormalfamily.net
обсуждение исходный текст
Ответы Re: Timestamp vs. Interval and formatting....  (Michael Glaesemann <grzm@myrealbox.com>)
Список pgsql-novice
Hello,

I've been building an application to catalog my CD collection, and have
been merrily adding the track lengths to a field of type "interval".
This seemed to make the most sense if I wanted to do math on them  (ie.
totals) later on.  Everything was working well until I realized that
tracks over 24 minutes were being returned as "1 day HH:MM".  What is
the easiest way to limit the field to MM:SS?

I noticed that the "to_char" function for intervals is deprecated.
Is timestamp a better choice for this field after all?

Thanks,
Dan J.

_________________
Visit Eva, Anne, and Dan at: http://www.thenormalfamily.net.

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

Предыдущее
От: CoL
Дата:
Сообщение: Re: mysql_field_name equivalent
Следующее
От:
Дата:
Сообщение: Re: Creating data bases