[R] years from as.POSIXlt

Christian Schulz ozric at web.de
Mon Mar 8 15:50:01 CET 2004


Hi,

how it's possible to extract the year and  the number
of days from Julian date. i'm little confused about the last two
functions and ?years .

EDATE  comes from sqlQuery with as.is=T
EDATE <- as.POSIXlt(datvears$ENROLLDAY)

Many thanks, Christian


> EDATE[1:5] 
[1] "2000-06-30 11:25:01" "2000-06-30 11:39:55" "2000-06-30 12:11:11"
[4] "2000-06-30 12:13:32" "2000-06-30 12:50:12"
> weekdays(EDATE[1:5])
[1] "Freitag" "Freitag" "Freitag" "Freitag" "Freitag"
> months(EDATE[1:5])
[1] "Juni" "Juni" "Juni" "Juni" "Juni"
> years(EDATE[1:5])
NULL
> days(EDATE[1:5])
NULL
>




More information about the R-help mailing list