I am using DateTime.now
and Time.now
methods. And I store it in some variables. Now I want this time in minutes. Meaning, instead of hours and minutes I want to get time in minutes only.
2.2.2 :014 > datetime = DateTime.now
=> Fri, 11 Sep 2015 12:13:00 +0530
2.2.2 :015 > time = Time.now
=> 2015-09-11 12:13:06 +0530
2.2.2 :016 >
Now i want to calculate this time entirely in minutes. is there any method like to_minutes like below?
datetime_in_min = datetime.to_minutes
time_in_min = time.to_minutes