ddmmyyyy hh:mm:ss DateTime format in C#

Last Reply on Mar 10, 2012 11:55 PM By Mudassar

Posted on Mar 09, 2012 06:48 AM

i have a text box where in  i want to display time in hh:mm format

i have the code forhe same as

 if (!DateTime.TryParseExact(txtatime.Text, "hh:mm", null, System.Globalization.DateTimeStyles.None, out Test4) == true)


error msg


in db i have values as 1900-01-01 00:00:00

but in textbox i get 12:00 AM


& error as format shldbe in HH:mm

You are viewing reply posted by: Mudassar on Mar 10, 2012 11:55 PM.
Posted on Mar 10, 2012 11:55 PM

Where is Time in that? You asked for time format right?