alcina
1
Hi All,
I have a datetime. I want to change only date in that so that result
will another datetime with different time.
For ex:
=> I want to change Fri May 03 09:45:43 UTC 2013 to Wed Jul 03 09:45:43
UTC 2013
Here date is changed from May 03 to Jul 03. I want the resulting
datetime to be of datetime class. Please let me how to implement it.
Thanks,
On Wed, Jul 3, 2013 at 12:33 PM, Ajit T. [email protected] wrote:
Got it.
Time.now.change(:year=>2023,:month=>12,:day=>22,:hour=>22,:min=>32,:sec=>30)
Just for the record: Time#change is not a standard Ruby method:
http://apidock.com/rails/Time/change#
Kind regards
robert
Got it.
Time.now.change(:year=>2023,:month=>12,:day=>22,:hour=>22,:min=>32,:sec=>30)
-Ajit