I have to export a table, with columns of text, and 3 columns with the date type. But I can't convert the date columns to date. They are originally in "character" format. The data frame is as follows:
Fecha de ejecucion
2022-05-31
2022-05-31
2022-05-31
2022-05-31
I want to move on to date with the formula:
BtotalSinPublico$’Fecha de ejecucion’ <- as.Date(BtotalSinPublico$’Fecha de ejecucion’)
The query: Class(BtotalSinPublico$’Fecha de ejecucion’)
It results in: [1] Date
But when I stand in the column of the data frame it enunciates the format 'unknown'. And when I export it:
WriteXLS(BtotalSinPublico, ExcelFileName = str_c("PrevisionesNiif_",Fecha,".xls)
The columns are formatted in General.