if (reader[7] is DateTime) { lblDateTime.Text = (reader[7] as DateTime).ToString("dd/MM/yyyy h:mm:ss tt"); } else { // reader[7] isn't a DateTime }
lblDate.Text=Convert.ToDateTime(DateVariable).ToString("dd/MM/yyyy");
lbl.Text = Convert.ToDateTime(YourDateVariable).ToString("dd/MM/yyyy");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)