Error while converting into Date format in R?

r

#1

I have a data set in which there is variable name Effective To Date which has a date in the format of a factor .So I have decided to convert into date format .But while converting it I am getting an error.

as.Date(z$Effective.To.Date)
Error in charToDate(x) : 
  character string is not in a standard unambiguous format

#2

try adding the format option in your as.Date call as follows-

as.Date(z$Effective.To.Date, format="%m/%d/%Y")


#3

as.Date(as.character(z$Effective.To.Date), format="%m/%d/%Y")

As mentioned by @chandnijoshi09 you need to mention the correct format
%m/%d/%Y

Can you give some sample dates