Re: [R] as.date

From: arnaud Gaboury <arnaud.gaboury_at_gmail.com>
Date: Tue, 01 Jun 2010 18:11:41 +0200

TY for the tip. The lower case is in fact the culprit.

> -----Original Message-----
> From: Erik Iverson [mailto:eriki_at_ccbr.umn.edu]
> Sent: Tuesday, June 01, 2010 6:05 PM
> To: arnaud Gaboury
> Cc: r-help_at_r-project.org
> Subject: Re: [R] as.date
>
>
> > 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.



R-help_at_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. Received on Tue 01 Jun 2010 - 16:16:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Jun 2010 - 16:20:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive