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
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…
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 :