[R] as.date
Erik Iverson
eriki at ccbr.umn.edu
Tue Jun 1 18:04:56 CEST 2010
> Where does the problem comes from?? Maybe from my sytem date ??
Simply from not reading the options carefully enough, from ?strptime,
‘%y’ Year without century (00-99). If you use this on input, which
century you get is system-specific. So don't! Most often
values 00 to 68 are prefixed by 20 and 69 to 99 by 19 - that
is the behaviour specified by the 2001 POSIX standard, but it
does also say ‘it is expected that in a future version of
IEEE Std 1003.1-2001 the default century inferred from a
2-digit year will change’.
‘%Y’ Year with century.
You want %Y, not %y.
More information about the R-help
mailing list