Hi everyone, I have a problem born out of a design decision back when this app was PHP based. Basically it's an Upcoming events module and the users can add upcoming event to their website. Long and short: the date is stored in a seperate field from the time in the database. The field types are date and time, thus resulting in a Date object and a Time object, here's a paste of a sample object instance:
=> #<UpcomingEvent id: 1, title: "Party at Brendons", happening_on: "2008-04-18", happening_at: "2000-01-01 09:00:00", short_description: "Wanna know about it?", long_description: "It's all here", price: "$55", active: true, location: "Hamiltron", position: 1, upcoming_event_set_id: 1>
So essentiall it's at 9am on the 18th of April 2008.
Now here's the fun part, now that the data has been migrated from the old app, and lots of other non-legacy clients will be using this module also, I'd like to tidy it all up with a migration. I also require the date and time to be in one field for making a hEvent (microformat) using the microformat plugin.
The question, how can I join those two fields together to form one cohesive DateTime or even Time object?
I would use your answer probably to migrate the database to a single datetime field which would mean no calculation work to get the microformat date to work every time the page loads.
Your help on this seemingly simple problem would be great, I've
stuffed around for hours and hope someone with more experience can
show me the light
Cheers,
Brendon