I'm trying to format the date which is received from the query in rails but the value is not updated. Here is my code :-
@data = "My query"
@data.each do |eventdata|
eventdata.start_date = eventdata.start_date.strftime("%Y-%m-%d %I:%M %p")
puts "*******************"+eventdata.start_date.to_s
eventdata.end_date = eventdata.end_date.strftime("%Y-%m-%d %I:%M %p")
end
The date received from my ajax call is in this format '2012-12-06T00:00:00+05:30'
,it is not updated. What could be the issue?
Also the event value printed on my console is ******************2012-12-06 00:00:00 +0530