Skip to content
Prev 382273 / 398502 Next

Incorrect Conversion of Datetime

Enrico seems to have found the problem - you can't change dates much
by changing the time zone, but transposing month and day will do the
trick nicely. The mm/dd/yyyy format and others like it are so common
that you always have to be on the lookout for it. Is the sample data
you included in your first email taken from the file you are reading
in? When I read in that sample data the correct result was returned. I
would open the original file in a text editor, read the data in using
your commands and then:

head(dta)

and compare what appears with the original file. You may see the
problem straightaway.

Jim
On Thu, Jan 9, 2020 at 7:50 AM Enrico Schumann <es at enricoschumann.net> wrote: