2,"%m/%d/%Y")
}
fun1(x1,1950)
#[1] "1971-04-25" "1964-04-20"
str(fun1(x1,1950))
# Date[1:2], format: "1971-04-25" "1964-04-20"
A.K.
- Original Message -
From: Frans Marcelissen
To: "R-help@r-project.org"
Cc:
Sent: Friday, A
ane
Kingston ON Canada
> -Original Message-
> From: frans.marcelis...@digipsy.nl
> Sent: Fri, 30 Aug 2013 15:12:40 +0200
> To: r-help@r-project.org
> Subject: [R] strange conversion char to date
>
> Hi R-friends,
> Can anyone explain the following strange behavior to me?
Take a look at the documentation as to what "%y" means:
‘%y’ Year without century (00-99). On input, values 00 to 68 are
prefixed by 20 and 69 to 99 by 19 - that is the behaviour
specified by the 2004 and 2008 POSIX standards, but they do
also say ‘it is expected
Hi R-friends,
Can anyone explain the following strange behavior to me?
> as.Date( "4/25/71","%m/%d/%y")
[1] "1971-04-25"
> as.Date( "4/25/62","%m/%d/%y")
[1] "2062-04-25"
so 71 is converted to 1971, while 62 is converted to 2062? Does anyone know
why? And is there a simple way to specify the date?
4 matches
Mail list logo