Cannot convert date format from "MM/dd/yyyy HH:mm:ss" to "dd/MM/yyyy HH:mm:ss" when tried to store it in DateTime variable

Hi I have a string “StrDate” = “04/22/2020 18:30:40” and need to convert this to “dd/MM/yyyy HH:mm:ss” format and store it datetime variable.

Approach:
StrFormatedDate = DateTime.ParseExact(StrDate,"MM/dd/yyyy HH:mm:ss’,CultureInfo.InvariantCulture).tostring(“dd/MM/yyyy HH:mm:ss”)

created a variable DateFinal with datatype System.DateTime to store the formatted date as

DateFinal = DateTime.ParseExact(StrDate,"dd/MM/yyyy HH:mm:ss’,CultureInfo.InvariantCulture)

however this format is same as StrDate. so any help on how to change the format and store it datetime variable

The only way to change the way the date format appears is by creating a String variable and storing DateTime.ParseExact(StrDate,"MM/dd/yyyy HH:mm:ss’,CultureInfo.InvariantCulture).tostring(“dd/MM/yyyy HH:mm:ss”) in that. You cannot format a Datetime object.