so i think just do like this.
Take the current system data, then subtract one year, den select data from
MySQL with this new date.
*my question is how to subtract one year from current date in ruby,
basically the format of date in MySql is YYYY-MM-DD. so how to subtract one
year from this.*
i tried one..
*time = Time.new
*
*puts ddat = time.strftime("%d-%m-%Y") *
*
*
*here just i change dat format to DD-MM-YYYY, and then try to subtract 1.
But it shows error...*
*
*
*how to solve this...? and have any problem in this logic......?*
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/vPxUt-jm5SYJ.
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.