Leonel Leonel wrote:
> For example, if I want to store the amount of hours a service takes to
> complete such as...
> 
> 1 hour of consulting
> 2 hours of consulting
> 3 hours of consulting
> 
> 1 hour swedish massage
> 1.5 hours swedish massage
> 
> If it was all whole hours I could just use integer, but note I also need
> it for half hours.
> 
> TABLE: services
> name:string
> duration: ???
> 
> I tried using time, but since my development database is sqlite3, the
> datatype it uses it's datetime and stores the current date.

But your production database won't be SQLite, because SQLite is 
unsuitable for production.  In any case, there's nothing wrong with 
storing times in a datetime field and disregarding the date.

However, that's not what you need here.  You're storing time 
*intervals*, not clock times.  And you yourself spoke of "1.5 hours" 
above.  That suggests that a float or decimal type is what you want.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to