Rephrasing the question found at SO.
Code 1 :
DateTime.TryParse("5-5-5-5" , CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal , out result);
Code 2:
DateTime.TryParse("5-5-5-5.00" , CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal , out result);
When the format is changed to 5-5-5-5.00
entire result changes ,Why does that happen ?Does that depend on Culture properties ?
Do like in this answer
But they tell system what the string is: "5-5-5-5" is a horrible string format for a date. The format string would proberbly be: "d-M-y-h" in your case unless i misunderstand
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments