C# how to convert string to datetime format and return string
Answers
Answered by
1
That's simple to answer: It's not possible, so stop trying.
Proof: Any format includes M.d.yyyy as well as d.M.yyyy. In that case, 1.2.2016 can represent either
the first of February or
the second of January.
Conclusion: A translation from any format is not possible, since it's not possible to parse ambiguous dates without additional information.
Note: This has nothing to do with C# or your technology of choice. Your requirements are broken. Fix them.
Proof: Any format includes M.d.yyyy as well as d.M.yyyy. In that case, 1.2.2016 can represent either
the first of February or
the second of January.
Conclusion: A translation from any format is not possible, since it's not possible to parse ambiguous dates without additional information.
Note: This has nothing to do with C# or your technology of choice. Your requirements are broken. Fix them.
Similar questions
English,
7 months ago
Chemistry,
7 months ago
Physics,
1 year ago
Social Sciences,
1 year ago
Physics,
1 year ago