Convert special DateFormat into dd/MM/yyyy

Hi Everyone.

I have special date format as below. How to convert it into dd/MM/YYYY

Apr 5 2021 12:00AM

Thanks in advance!

@Mr.H - Please try this…

image

DateTime.Parse("Apr 5 2021 12:00AM").tostring("dd/MM/yyyy")
1 Like

@Mr.H,

You can also have another way to convert Date,

image

2 Likes

Hi Bro.

Thanks you.

But the Date Month not fix is “Apr 5 2021 12:00AM”, it can be “May 7 2021 12:00AM” or any other.

How to do this ?

Thanks in advance!

@Mr.H - assign it to variable and pass the variable to datetime.parse …

1 Like

Thanks you Bro.

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