Convert units hours since 1950-01-01 00:00:00 to date
On Wed, Dec 31, 2014 at 6:22 AM, Eko Susilo <ekosusilo at live.com> wrote:
as.Date(as.POSIXct(timeval, origin="1950-01-01"))
as.Date works with number of days, so try: > as.Date(timeval/24, origin="1950-01-01") [1] "2014-11-29" as.POSIXct works with seconds, so try: > as.POSIXct(timeval*60*60, origin="1950-01-01") [1] "2014-11-29 12:00:00 GMT" I recommend as.Date if you only want dates and not date-times and your data is really integer days. Barry