I have a Time Value stored as string with the format HH:mm
I used the following code to parse it as date with Today Date
DateTime.ParseExact("09:00","HH:mm",New System.Globalization.CultureInfi("En-GB"))
The Result Is 2017-03-15 09:00:00
When Running this Code From another machine i get the following Result: 1899-12-31 09:00:00
I replaced my code to the following
DateTime.ParseExact(DateTime.Now.ToString("yyyy-MM-dd") & " 09:00","yyyy-MM-dd HH:mm",New System.Globalization.CultureInfi("En-GB"))
And it works Fine, But i still want to Know why every system parsed the date to a different Value???
Default values for missing Year/Month/Day in
DateTime.ParseExact
From .NET source code:
The following table describes the behaviors of getting the default value when a certain year/month/day values are missing.
An "X" means that the value exists. And "--" means that value is missing.