Anil Raina

Anil Raina

  • NA
  • 3
  • 602

ListView Coding

Jul 23 2015 2:39 AM
I want to insert only date in my listview as I am Printing the listView it shows date and time also but I want only date to print.The part of my program code is shown below
 
OleDbCommand cmd = new OleDbCommand("select * from view_attemp where emp_id='" + (this.lstv_AttEmp.Items[lstv_AttEmp.FocusedItem.Index].SubItems[0].Text.Trim()) + "' and att_date=#" + date.Value.Date + "#", clsCon.cn);
OleDbDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
strEditID = dr["emp_id"].ToString();
// strEditDate = Convert.ToDateTime(dr["att_date"]);
this.comEname .SelectedText = dr["emp_name"].ToString();

this.date .Value = Convert.ToDateTime(dr["att_date"]);
this.comStatus .SelectedText = dr["att_status"].ToString();
this.txtTime .Text = dr["att_time"].ToString();
this.txtRemarks.Text = dr["remarks"].ToString();


}
Kindly Help to get Out of It as soon as possible

Answers (3)