Saving the record into data base from data grid view.
code as follows;
sql = "insert into Tb_SCh_TIme_Table(Date,Session,Course,Faculty_Code)" + " values ('" + Convert.ToDateTime(datagridView.Rows[i].Cells[0].Value.ToString()) + "', '" + int.Parse(datagridView.Rows[i].Cells[1].Value.ToString()) + "', '" + datagridView[j, i].Value.ToString() + "','" + datagridView.Columns[j].HeaderText.ToString() + "')";
through the above query it is saving to the data base.
in database Date is stored in the format such as 1/7/2013 12:00:00 AM.
but i want the the date to be stored in the format of 1 jan only.
the above format of date and month(Month to be character format)
Convert.ToDateTime(datagridView.Rows[i].Cells[0].Value.ToString()
from the above query how to do.
output as follows;
Date
1 jan
8 jan
3 Feb
like that to be saved in the data base.
how to do.please help me.