I try to change a date variable from factor format to date format but I can't and I don't know why.
Here is my code
temp_tot <-read.csv("temp_total_030820.csv",header=TRUE,sep=",",na.strings=".", stringsAsFactors=FALSE)
class(temp_tot$date)#character
temp_tot$date<-as.Date(temp_tot$date,format="%m/%d/%y")#returning N.A
Here is an output of my data
structure(list(X = 1L, capteur = "30-01-s.", Year = 2021L, jj = 1L,
variable = "tmax", value = 0.517166666666667, dpt = "Aigoual",
pos = "sol", date = "2021-01-01"), row.names = 1L, class = "data.frame")
I've tried a lot of functions but I don't know where I'm stucked. Does it has something to do with the "Locale" ?
Thank you !