Minute Difference
On 10/05/2012 10:56 PM, Rantony wrote:
Hi, Here i have a time along with date, for eg:- "10/5/2012 5:05:00 AM" i need to do minus 10 minutes along current date Like this :- "10/5/2012 4:55:00 AM"
Hi Antony,
Did you get an answer for this?
oldtime<-strptime("10/5/2012 5:05:00 AM",
format="%d/%m/%Y %I:%M:%S %p")
oldtime
[1] "2012-05-10 05:05:00"
# now subtract 10 minutes (600 seconds)
oldtime - 600
[1] "2012-05-10 04:55:00 EST"
Jim