String to Date Converstion

Hi everyone,

i have an issue in converting string to Date format.
string = ‘10-8-2021’
i want to convert this string to date like 10-08-2021/10-8-2021.
if the string is like 10-08-2021 then i can able to convert to date.
but i am getting the string as ‘10-8-2021’. not able to convert.
and i also dot need time span.
Please help. TIA

Hi @SudhaT

Try this expression



Try this approach as well



Hi SudhaT,

Please check this link . Hope it helps you

datetimes don’t have formats. “10-08-2021” is not a date, it’s a string. If you want to change how it’s displayed, convert it to date and then back to string with a different format. For Example…


…will output 10/08/2021

Hi @SudhaT ,

Is your String having the Single Quotes and . mark as an extra ?

If the extracted String always contains these characters, we could perform a Replace of these characters first and then Perform Conversion to Date in the below way :


Hi @SudhaT,

You can try Below -