Is there a way to do something like this (this is in R)
df$dataCol <- as.Date(df$dataCol, format="%Y%m%d")
where the dataCol is of the format "20151009".
There is a Date
constructor with an argument for the format,
but the syntax is slightly different.
using Dates
Date( "20141123", DateFormat("yyyymmdd") )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With