Hi all, I am a newbie and just recently started to create apps with ruby on
rails so please go easy on me :)

I have an app which has a database in mysql which is called bus_times and
consists of 3 columns which are: id, time and weekday. Time is set to time
and weekday is a string. So it looks something like this:

1   monday   20:00:00
2   tuesday   12:00:00
3   wednesday  3:00:00
4   wednesday  15:00:00 ..etc

What I want to do is to pick out the times from my database and show them on
my view depending on what the date is today. Hence assign my strings
mon,tues,wed etc to an actual date so like today is wednesday I want it to
pick out just the wednesday times. How do I do this I have looked everywhere
and cannot find a solution thanks in advance...
-- 
View this message in context: 
http://old.nabble.com/What-if-statements-help-with-dates-tp26605994p26605994.html
Sent from the RubyOnRails Users mailing list archive at Nabble.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