Hi I am trying to convert a string ExternalAssessmentDate= ‘01/12/2023’ to Date and Time type. I have used parseDateTime($NewExternalAssessment/ExternalAssessmentDate,'MM/dd/yy') but it is throwing error. I have pasted a screenshot of the error, can anyone tell what i’am missing here.
asked
Rakshith Mallaiah Sathish
2 answers
1
Hi Rakshith,
The string seems being empty. Did you debug it?
Best,
Istvan
answered
Istvan Danyi
0
Hi Rakshith,
The error is triggered because you use slashes instead of a dash.
So you must change the ExternalAssessmentDate= ‘01-12-2023’ and the function to be parseDateTime($NewExternalAssessment/ExternalAssessmentDate, 'MM-dd-yyyy'). You should change the date format to be with four ‘y’.