I have encountered something unexpected while working with the function strptime(). The format of the date I have consists of "1/22/2013 11:00:00 P.M" . The format I am using for this is "%m/%d/%Y %I:%M:%S %p".
The code is as follows.
strptime("1/22/2013 11:00:00 p.m",format="%m/%d/%Y %I:%M:%S %p")
[1] NA
but if I use
strptime("1/22/2013 11:00:00 pm",format="%m/%d/%Y %I:%M:%S %p")
[1] "2013-01-22 23:00:00"
I get the appropriate result.
So does this feature lack in strptime to detect p.m and its variations such as p.m. etc in place of PM or pm. Is this a bug in R ?
The version of R I am using R.14.2 on windows 7 32-bit