Skip to content
Prev 15626 / 398500 Next

Locale problems with strptime to convert dates

Hi. I've already posted this question 2 months ago but as I've got no
answer I've decided to try again :-)

I'm using R1.3.1 on a x86 machine running Win 2000.

My problem: I want to convert a string to a date format using strptime.

As I'm from Portugal my locale information is the following:
[1]
"LC_COLLATE=Portuguese_Portugal.1252;LC_CTYPE=Portuguese_Portugal.1252;LC_MO

NETARY=C;LC_NUMERIC=C;LC_TIME=Portuguese_Portugal.1252"

If I do the following everything works fine :
[1] "2001-09-25"

because the month September in Portuguese is named "Setembro" and thus
is
abbreviated as "set" and not "sep" as in English.

However, I'm interested in reading English dates. I was hoping that the
following would solve my problem:
[1] "English_United States.1252"

However, I get the following error :
[1] "NA"

Thank you in advance for any help with this,
Luis Torgo

--
Luis Torgo
    FEP/LIACC, University of Porto   Phone : (+351) 22 607 88 30
    Machine Learning Group           Fax   : (+351) 22 600 36 54
    R. Campo Alegre, 823             email : ltorgo at liacc.up.pt
    4150 PORTO   -  PORTUGAL         WWW   : http://www.liacc.up.pt/~ltorgo



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._