Ruby on Rails Thursday, February 2, 2012

On 2 February 2012 09:20, amvis <vgrkrishnan@gmail.com> wrote:
> no, That is working... but i need like this
>
> :bill_date => u.bill_date,
>
> I want to take the day, month,year from this  u.bill_date. can i get, if am
> using like this
>
> :day_of_week => Time.month(u.bill_date)

What type is bill_date? Assuming it is a Time or Date object then you want
u.bill_date.month

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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment