我有文件显示,格式时标象25/03/2011 9:1 5 p.m.
。
如何将这一案文同以下几类时间段相提并论:strptime
或code。 POSIXct ?
Here is what almost works:
> as.POSIXct("25/03/2011 9:15:00", format="%d/%m/%Y %I:%M:%S", tz="UTC")
[1] "2011-03-25 09:15:00 UTC"
Here is what is not working, but I d like to have working:
> as.POSIXct("25/03/2011 9:15:00 p.m.", format="%d/%m/%Y %I:%M:%S %p", tz="UTC")
[1] NA
I m using R version 2.13.2 (2011-09-30) on MS Windows. My working locale is "C":
Sys.setlocale("LC_TIME", "C")