Hi Everyone,
i am facing issue in converting string to Datetime.

need urgent support to fix this
Hi @Rakesh_Tiwari ,
Try this,
var_DateTime_EnrollmentDate =
DateTime.ParseExact(var_str_EnrollmentDate.Trim,“ddMMMyy”,System.Globalization.CultureInfo.InvariantCulture)
Make sure,
var_str_EnrollmentDate = String
var_DateTime_EnrollmentDate = DateTime
Your input must look like:
17Apr26
FYR,
Thanks
Hi,
First, check content of $exceptionDetails at Locals panel when debug run stopped?
If it’s for input string matter, check content of var_str_EnrollmentDate. (Isn’t there extra character include white space?)
Regards,
just added .trim in expression as shown in img and rest are ok, tried running it after changing but same error.
Also var_str_EnrollmentDate = String - is of String there
var_DateTime_EnrollmentDate = DateTime - is of DateTime
but no luck, same error
Hi @Rakesh_Tiwari ,
Since it’s still not working, please check the exception details and also verify the value of the string variable?
Thanks
got the resolution, some variable was not passed in invoke workflow, hence causing issue, thanks for everyone support.
need one support..i am getting comilation error in studio when i am trying to debug the code, how to fix it. i tried validating project and file, but still no luck
What is the error, can you please share more details ?
@Rakesh_Tiwari Please try this:
DateTime.ParseExact(var_str_EnrollmentDate.Trim.ToUpper, “ddMMMyy”, System.Globalization.CultureInfo.InvariantCulture)