I have a string like this :
10/12/1990
that is supposed to be a date.
I need to convert it into a date like that :
1990-12-10
How can I do that ? I tried a lot of things like converting it into a datetime and trying to format it like 'yyyy-MM-dd' but I always got this error when I run the code :
System.TypeException: Invalid date/time: 10/12/1990
Date.parse()
, if you're in a locale that uses the MM/DD/YYYY date format?