Hi Sapna, This is how to get date formated like you need.
Time.now.strftime("%m/%d/%Y")
=> "05/30/2007"
You can get yesterdays date by subtracting seconds from current time.
t = Time.now-(60*60*24)
=> Tue May 29 12:21:02 Central European Standard Time 2007
t.strftime("%m/%d/%Y")
=> "05/29/2007"
Zeljko
--
ZeljkoFilipin.com
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
