I am new to R and I am having trouble to convert a date. Consider the following:
> A <- '30-Abr-17' #Portuguese
> B <- '30-Apr-17' #English
> as.POSIXct(A, '%d-%b-%y', tz = '')
[1] "2017-04-30 -03"
> as.POSIXct(B, '%d-%b-%y', tz = '')
[1] NA
When I use
tz = ''
It uses my timezone that is:
> Sys.timezone()
[1] "America/Sao_Paulo"
I tried something like:
as.POSIXct(B, '%d-%b-%y', tz = 'America/New_York')
[1] NA
But it still did not work. Any insights?
Thanks.