String to Date conversion not working as expected
User have a requirement to format the date to YYYY-MM-DD.
When user is using the @String.todate() function to convert string to date they are getting default value for a date type property.
For example, the value of the date type property should be like 2016-01-01 but its appearing as 19700101.
Steps to Reproduce
1.Convert a date to yyyy-MM-dd format using formatDateTime() function.
2.Convert the output string to date using @String.toDate() function.
Here’s the explanation for the reported behavior:
It is not possible to store the time in different formats.
Note that Date objects have no format.
To get a formatted string with "-", One has to convert to String.