468,121 Members | 1,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,121 developers. It's quick & easy.

Help needed on time data types

Hi I am trying to setup a timesheet app. However I have come up against
an unexpected problem (possibly fatal)

I cannot seem to find a field type in postgres that is equivalent to
h:mm without enforcing a 24 hour day limit. This seems to preclude pg
from use - am I correct?

All the date-time types seem to only be for specific time dates and not
for a running total.

Any help appreciated.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
2 876
mike wrote:
I cannot seem to find a field type in postgres that is equivalent to
h:mm without enforcing a 24 hour day limit. This seems to preclude pg
from use - am I correct?


You want to use "interval" data type and then do some formatting on the
output to get 123 hours 30 minutes.

See:
http://www.postgresql.org/docs/7.4/i...-datetime.html

--
Michal Taborsky
http://www.taborsky.cz
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
mike wrote:
All the date-time types seem to only be for specific time dates and
not for a running total.


You probably want the interval type.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by abcd | last post: by
36 posts views Thread by felixnielsen | last post: by
15 posts views Thread by Jay | last post: by
2 posts views Thread by hcaptech | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.