I have monthly climate data with dates stored in long format (e.g., 1/1/1950), which is how they display when opening the csv file with Excel.
However, when I read these files into R, they show a short date (e.g., 1/1/50).
Now when I use lubridate::mdy
, it assumes that the date is 1/1/2050.
I could easily convert 2000s to 1900s, but these data range from 1950 to 2100.
So some of the dates should be 2050, but some should be 1950.
Any idea why R is reading in short dates?
Note that I've set my system preferences to show as long date.
OS info:
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock