[R] How to parse a really silly date with lubridate

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Jul 13 15:52:41 CEST 2022


В Wed, 13 Jul 2022 15:40:43 +0200
Dr Eberhard Lisse <nospam using lisse.NA> пишет:

> 	 1 9. Jul 2022 at 11:39
> 	 2 10. Jul 2022 at 01:58

Don't know about lubridate, but the following seems to work:

Sys.setlocale('LC_TIME', 'C')
strptime(
 c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'),
 '%d. %b %Y at %H:%M'
)

(Use Sys.getlocale() and on.exit() to restore the previous locale
state if you need it.)

-- 
Best regards,
Ivan



More information about the R-help mailing list