Hi,

I am having trouble extracting just the year or the month or the day from a
date such as 5/7/2007 which is May 7th 2007. Is there any particular
function to extract just the year from this format?

When I am reading this data from a text file it is reading it correctly in
the same format but does not acknowlede it as date but as a factor. If I try
as.date(5/7/2007) then it is converting it to 1Jan1960. Weird it is. Any
help on that front?

Any help is greatly appreciated.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to