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
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
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
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
--
4 matches
Mail list logo