Monday, March 26, 2012

Displaying in 24 hours format.

var val = rdr.GetValue(0);DateTime dt = DateTime.Parse(val.ToString());

feildValue = dt.ToString("hh:mm tt");

1 comment:

  1. Before I read this webpage I did not know that there were 24 hours in a day, I just thought there was two days taking place. However this valuable code sample has proved the error of my ways and has made me a King amongst my peers.

    ReplyDelete