I am trying to convert a string to Date, but I am getting a Invalid Date
error.
The input would be a String containing one of the following data formats:
YYYY
only yearMM/YYYY
month & yearDD/MM/YYYY
full date
The expected output is a Date
type, however, the only format I cannot convert is MM/YYYY
one.
How could I solve this specific case? Thanks.