S
Sriram Varahan
Hello,
I have two time objects:
# 2 days ago
time1 = Time.now - 48 * 3600
#=> Sun Jun 21 16:56:33 +0530 2009
time2 = Time.now
#=> Tue Jun 23 16:57:05 +0530 2009
I need to create a third time object which will have the date from time2
and the time from time1.
time3 should be:
#=> Tue Jun 23 16:56:33 +0530 2009
The issue I am facing is how do I extract the date and time to create
the third time.
Any suggestion would be welcome.
Thanks
Sriram.
I have two time objects:
# 2 days ago
time1 = Time.now - 48 * 3600
#=> Sun Jun 21 16:56:33 +0530 2009
time2 = Time.now
#=> Tue Jun 23 16:57:05 +0530 2009
I need to create a third time object which will have the date from time2
and the time from time1.
time3 should be:
#=> Tue Jun 23 16:56:33 +0530 2009
The issue I am facing is how do I extract the date and time to create
the third time.
Any suggestion would be welcome.
Thanks
Sriram.