String to Date conversion not working as expected
SummaryUser 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.
Error MessagesNot Applicable
Steps to Reproduce1.Convert a date to yyyy-MM-dd format using formatDateTime() function.
2.Convert the output string to date using @String.toDate() function.
Root CauseNot Applicable
ResolutionHere’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.
Published February 26, 2017 - Updated March 13, 2017