On 21 April 2011 08:23, Hemant Bhargava
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> Hello All,
>
> I need some explanation about iso8601 format. Googled it but
did''nt
> found as i wanted.
>
> Actually, i have a table called abc, columns are idate (type date) and
> itime (type time). I concatenated them like this,
>
> date_time = self.idate + " " + self.time
>
> and passed it as a parameter to a function which will returns me the
> is08601 format of date.
>
> But its not giving me properly formatted date. Cal you guys please light
> me what i am messing up?
Use strftime to format the date and time as you want it.
As an aside, you could use a datatime field to hold both the date and
time combined.
Colin
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.