Convert string to date in SparkR - Databricks

1

Speak up, all right?

I am trying a dataframe in the prophet algorithm in my work, so in Rstudio I used the following code to convert the "Data" data that is as string to Date, because the algorithm needs this format to make its predictions. p>

Feriados$Data <- as.Date(Feriados$Data, '%d/%m/%Y')

But when I run this code in SparkR it returns the field with null values or details this error

Error in as.Date.default(Feriados$Data, "%d/%m/%Y") : do not know how to convert 'Feriados$Data' to class “Date”

Can you help me?

Thank you.

    
asked by anonymous 10.12.2018 / 20:44

0 answers