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
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.