[R] strptime problems

Thomas Petzoldt thpe at hhbio.wasser.tu-dresden.de
Fri Sep 3 15:16:22 CEST 2004


Per Wiklund wrote:

 >
 > Hi, I'm experiencing a problem with strptime. (R 1.9.1 on a Win2000
 > machine)

[...]

 > strptime(as.character(ccc[[11]]$TradeDateTime[161522]),
 >    "%d-%b-%y:%H:%M:%S")
 > [1] NA

[...]

Hello,

unfortunately, your code does not show what data are in the object ccc, 
so an exact diagnosis is almost impossible. However, I suspect you have 
timezone problems which are common on Windows computers. If you don't 
need timezone calculations I suggest to use the Date class (uppercase 
"D") or the chron package instead of the POSIX classes, see the last 
issue of R-News:

http://cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf

Thomas P.




More information about the R-help mailing list