Re: [R] Numeric to Date

2010-03-10 Thread ManInMoon
numToPOSIXct <- function(v) { now <- Sys.time() Epoch <- now - as.numeric(now) Epoch + v } Try this - where v is your numeric version of date -- View this message in context: http://n4.nabble.com/Numeric-to-Date-tp1588108p1588149.html Sent from the R help mailing list archive at Nabb

Re: [R] Numeric to Date

2010-03-10 Thread Marc Schwartz
On Mar 10, 2010, at 3:29 PM, GULATI, BRIJESH (Global Markets FF&O NY) wrote: > Is there easy way to convert numeric to date? > > For example: > > If I have, > > a = as.Date("2010-03-04") > > And, if run > >> as.numeric(a) > [1] 14672 > > Is there any function that I can use to convert

Re: [R] Numeric to Date

2010-03-10 Thread Achim Zeileis
On Wed, 10 Mar 2010, GULATI, BRIJESH (Global Markets FF&O NY) wrote: Is there easy way to convert numeric to date? For example: If I have, a = as.Date("2010-03-04") And, if run as.numeric(a) [1] 14672 Is there any function that I can use to convert 14672 back to the date. You c

[R] Numeric to Date

2010-03-10 Thread GULATI, BRIJESH (Global Markets FF&O NY)
Is there easy way to convert numeric to date? For example: If I have, a = as.Date("2010-03-04") And, if run > as.numeric(a) [1] 14672 Is there any function that I can use to convert 14672 back to the date. Thx in advance, Brijesh --