I was looking for stackoverflow for an answer, but no luck. I am developing a Windows application and I have several lines in different date formats, for example.
dd/MM/yyyy
MM/dd/yyyy
MM-dd-yyyy
dd-MM-yyyy
dd/MM/yyyy hh:mm::ss
MM/dd/yyyy hh:mm::ss
etc...
But I need to convert to a common format dd/MM/yyyy. The application can run on any Windows machine in different cultures.
What is the right way to do this?
EDIT: One more thing, I may not know what the input line format is.
Thanks in advance.
source
share