lb_display is the lable name where the result will be shown.
Suppose “11/2/2003 12:00:00″ this is the value which is stored in the
data base when you declare the row as date time in database now if you
want the date from datetime data type then
FOR C# CODE
- Code:
-
Lb_Display.Text = DateTime.Parse(Ds.Tables[0].Rows[0][7].ToString ()).ToShortDateString ();
or
Lb_Display.Text = DateTime.Parse(’11/2/2003 12:00:00 Am’).ToShortTimeString ();
Result will be “11/2/2003″ or "12:00:00 Am"