[R] Date parsing question
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu May 27 11:31:31 CEST 2004
Ajay Shah <ajayshah at mayin.org> writes:
> How do I parse a date "yyyymmdd"? I tried asking chron(s, "ymd") but
> that didn't work. Would the date parsing routines of the Date class of
> 1.9 grok this?
Yes, trivially:
> as.Date("20040527",format="%Y%m%d")
[1] "2004-05-27"
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list