Date output after input is done

Hello, i am a newbie on ruby!

I wanted to know how can i output year, month and day after i input
those values?

Here is my code:

<% @graffics.each do |gr| %>

<% end %>

<%= gr.time.year %> <%= gr.time.month %> <%= %> <%= %>

This code return a default date - 2000.01.01
I hope you can help me, thank you!


Sorry, but we aren’t psychic. What kind of objects are the elements of
@graffics? How did you set the date attributes?

If your code is returning a default date, and you want it to return a
different date, that means that the value of the date variable needs to
be set. The fact that your code returns a date shows that the the code
you submitted is working fine. Look at the code that sets the graphics
variable’s date.

Your question is a little unclear.