Question

String format date (DD.MM.YYYY) conversion to Date format (MM/DD/YYYY)

Hello All,

I need a help on string to date conversion in pega robotics. I have one string variable which has a date as DD.MM.YYYY. Now i want it in date format as MM/DD/YYYY. How can i achieve this through automation blocks?

Comments

Keep up to date on this post and subscribe to comments

Pega
May 13, 2019 - 2:41pm

You will need a C# script to provide an "odd" input format like the one you have supplied as you can't easily create a format provider in an automation. I attached a sample solution. The Parse method on the DateTimeUtils will handle common formats, but won't know what to do with a string in the format you provided.