# Time with only hour and minute

**URL:** <https://www.ruby-forum.com/t/time-with-only-hour-and-minute/129892>\
**Category:** Rails\
**Created:** [February 22, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/time-with-only-hour-and-minute/129892 "2008-02-22T13:02:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 22, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/time-with-only-hour-and-minute/129892/1 "2008-02-22T13:02:06Z")

</div>

Hi

```
  I have to create in view a field as

```

Effort= Hour:Minute

If Hour is more than 24 Then a day is counted…How can I setup this in  
view?And what field(Type) should be there in the database(Postgres) to  
store it?

More details  
A work is given to a person.Here he can say how much time he took to  
complete it.

Sijo

---

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [February 22, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/time-with-only-hour-and-minute/129892/2 "2008-02-22T15:03:43Z")

</div>

As far as it’s not time, rather ‘amount of time’, integer field for  
minutes should work.  
Or decimal (one digit under the point) for hours - who really need  
those minutes counted?  
Text field in view will work best, but make sure to handle inputs like  
“half hour”, “two hours and a bit” and “whole day”.
