Probably not the most elegant of solutions (and please let me know if
there are any better) but this is the best I have come up with!

dt = DateTime.parse("#{tapp.appdate}T#{tapp.apptime.strftime("%H:%M:
00")}")

On Dec 26, 8:00 pm, "Ruby on Rails: Talk" <[email protected]>
wrote:
> Hi
>
> I have a database with a seperate Date and Time fields.
>
> I'm trying to work out how to search, return and combine the two,
> turning them into one DateTime value so that I can then compare it to
> the current date and time and see if it's in the future or past.
> However, I'm having no luck unfortunately.
>
> Can anyone point me in the right direction?
>
> I've searched for hours for this and having no real luck.
>
> Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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