types.castDate(format = "default", value = as.Date("2019-1-1"))
types.castDate(format = "default", value = "2019-1-1")
types.castDate(format = "any", value = "2019-1-1")
types.castDate(format = "%d/%m/%y", value = "21/11/06")
types.castDate(format = "%d/%m/%y", value = as.Date("2019-1-1"))
Run the code above in your browser using DataLab