Timestamp vs. Interval and formatting....

From: Dan Jewett <dan(at)thenormalfamily(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Timestamp vs. Interval and formatting....
Date: 2004-01-04 20:11:17
Message-ID: 20040104151117177662.GyazMail.dan@thenormalfamily.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ghaverla 2004-01-04 20:19:52 Re: Creating data bases
Previous Message Bruno LEVEQUE 2004-01-04 15:04:22 Re: problem with connecting to postgresql server