Hi Guys,
Though i can find many examples related to Parking fee code, i dint find a code the way am trying below.
Am posting initial code here:
Though i give the correct input, i dint get the expected output here.
Input: 2015/11/09 01:30:15
Output: 01/01/0001 01:15:30 AM
The Date and Time is wrong, and how to handle AM and PM ?
Console.WriteLine("Please enter list of cities");
String input1 = Console.ReadLine();
DateTime dt1;
bool res1 = DateTime.TryParseExact(input1, "yyyy/MM/dd hh:mm:ss", null, System.Globalization.DateTimeStyles.None, out dt1);
Console.WriteLine(dt1);
Console.ReadLine();
6 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohan SPosted Nov 9, 2015, 7:49 AM
Ravi KumarPosted Nov 9, 2015, 6:49 AM
Mohan SPosted Nov 9, 2015, 6:29 AM
Ravi KumarPosted Nov 9, 2015, 5:49 AM
Mohan SPosted Nov 9, 2015, 4:21 AM
Ravi KumarPosted Nov 9, 2015, 4:10 AM