I am working on a project that involves using R to clean up date entries from an excel file in order to upload them to a database. Within the excel file, some of the dates are already in a date format, (i.e. "8/18/2020"), while others are not (i.e. "8/18/2020 2027"). I want to import the column of dates into R so I can run code to reformat the "8/18/2020 2027"-like cells. I am currently using the read_excel() command from the readxl library to import the excel files, using similar syntax to this:
read_excel("filepath", col_types = c("date"))
The issue that I am running into is that if I define the column as a date column, readexcel() will not recognize the "8/18/2020 2027"-like cells as valid dates and won't import those cells.
On the other hand, if I define the column as a text column, readexcel() will instead simplify the "8/18/2020"-like cells into a different number (44063).
Is there a way to import the entire row into R with its entries untouched?