Date Conversion - .net syntax

How do I convert April 28,2015 to 04/28/15

Hi there @prabhu_ponnusamy,
The following should work:
DateTime.ParseExact("April 28,2015", "MMMM dd,yyyy", Nothing).ToString("MM/dd/yy")

This converts the value “April 28,2015” into a DateTime value, then converts it back into a String, using the format “MM/dd/yyyy”.

1 Like

Hi @prabhu_ponnusamy

Just by doing below thing also you can get the output that you are expecting :-

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer: