.net - convert string in unknown format to date in c# -


I have searched for stack overflow for an answer but there is no luck I am developing a windows application and my There are some strings in different date formats, like

 

But I have to convert to a normal format - dd / month / year .

EDIT: One more thing is that I do not know what the format of incoming string is.

Thanks in advance.

Experiment with different patterns in the form of formats.

If you need to actually use string representation after parsing, then use the ToString method with the clear code of

DateTime , In which you are interested (because it is culture-irreversible). It is better to keep datetime , because this format is an agnostic.

Comments