I Want to Covert the String Variable Contain "09222023" to this Format 22.09.2023

Suggest suitable expression to get the required output, its a string Variable type, Thanks i n advance for your help

Hi @Gopikrishna_S

Input= "09222023"
Output= DateTime.ParseExact(Input,"MMddyyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")

Hope it helps!!

1 Like

Hi @Gopikrishna_S ,
Can you share some template input?


DateTime.ParseExact(strString,“MMddyyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)
regards,

Hi

Try with this expression

Stroutput = DateTime.ParseExact(Strinput.ToString.Trim,“ddMMyyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)

Have a view on this for all Datetime conversion

Hope this helps

cheers
@Gopikrishna_S

@Gopikrishna_S

DateTime.ParseExact(str,“MMddyyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)

image

you can try this:

Assign: inputDateString=“09222023”
outputDate = DateTime.ParseExact(inputDateString, “MMddyyyy”, System.Globalization.CultureInfo.InvariantCulture)

@Gopikrishna_S

Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.

Hi,

it’s double quote matter of Windows project. Can you try to use (copy and paste) the following expression?

DateTime.ParseExact(strString,"MMddyyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")

FYI

Regards,

Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled. Getting this error

Try this

your issue is double quotes , you can copy and paste in assign activity below one

DateTime.ParseExact(strString,"MMddyyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")

@Gopikrishna_S

Getting the Required Output Thank You :slightly_smiling_face:

1 Like

Getting the Required Output Thank You :slightly_smiling_face: palaniyappan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.