Is this errors in Date_format function?

#1

as.Date("09/03/2018",format="%d/%m/%y")
[1] "2020-03-09"
as.Date("09/03/2019",format="%d/%m/%y")
[1] "2020-03-09"

Strange..
it's the result.. what would be the problem?

0 Likes

#2

sorry, I found the reason.
when I write as bellow, the result was correct..

as.Date("09/03/2019",format="%d/%m/%Y")
[1] "2019-03-09"

the '%y' and the '%Y" was different..

Thank you~ ^^

0 Likes

closed #4

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes