Message-ID: <506FB872.9040000@bitwrit.com.au>
Date: 2012-10-06T04:49:54Z
From: Jim Lemon
Subject: Minute Difference
In-Reply-To: <1349441801373-4645157.post@n4.nabble.com>
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