I have a string which represents a DataTime value, and I want to workout what string format was used to create the string.
For example
- Given "Wednesday 27 Jan 2010" I expect "dddd dd MMM yyyy"
- Given "2010 01 27" I expect "yyyy MM dd"
Assume that the date is close to DateTime.Now and relates to the CurrentCulture. So given that we have en-GB culture
- Given "01 01 2010" I expect "dd MM yyyy"
Is there a simple way to do this?