[R] converting to date object...
akshay kulkarni
@k@h@y_e4 @end|ng |rom hotm@||@com
Wed Apr 12 19:45:12 CEST 2023
Hi Eric,
THanks a lot..
Thanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: Eric Berger <ericjberger using gmail.com>
Sent: Wednesday, April 12, 2023 8:20 PM
To: akshay kulkarni <akshay_e4 using hotmail.com>
Cc: R help Mailing list <r-help using r-project.org>
Subject: Re: [R] converting to date object...
lubridate::dmy("12 APR 2023")
On Wed, Apr 12, 2023 at 5:34 PM akshay kulkarni <akshay_e4 using hotmail.com<mailto:akshay_e4 using hotmail.com>> wrote:
dear members,
I want to convert "12 APR 2023" into a Date object. I tried as_Date() from lubridate, but it is not working:
> as_date("12 APR 2023")
[1] NA
Warning message:
All formats failed to parse. No formats found.
> as_date("12-APR-2023")
[1] NA
Warning message:
All formats failed to parse. No formats found.
I am looking for a shorthand way of doing it. Of course, one can convert APR to 4 and get the job done, but I ma looking for a short and elegant code
please help...
THanking you,
Yours sincerely,
AKSHAY M KULKARNI
[[alternative HTML version deleted]]
______________________________________________
R-help using r-project.org<mailto:R-help using r-project.org> mailing list -- To UNSUBSCRIBE and more, see
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.
[[alternative HTML version deleted]]
More information about the R-help
mailing list