Message-ID: <D5F94B0B-9046-4AAA-80BF-A4A42269C855@comcast.net>
Date: 2013-12-14T16:43:07Z
From: David Winsemius
Subject: Minutes after midnight to time
In-Reply-To: <CAJhyqVhKk=X6_UBwpOcnWUVRQrM7kWXJfUQiDxPBq3VNUTZusA@mail.gmail.com>
On Dec 13, 2013, at 1:34 PM, Trevor Davies wrote:
> Is there a quick function that can convert minutes (seconds) after midnight
> to a time?
>
> i.e 670.93 (minutes after midnight) --> 11:10:56.**
>
> I know it can be done by hand but I thought there must be a function for
> this already.
format( as.POSIXct(Sys.Date()) + 670.93*60,
format="%H:%M:%S", tz="UCT")
[1] "11:10:55"
>
> Thank you.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
David Winsemius
Alameda, CA, USA