Author: Sidewinder2 | Posted on: 8/18/2008 9:07:21 PM | Views : 434

Hello There!,

             I got an format exception when tried to convert a string to datetime .Actually the string was in correct structure to convert it to datatime ,it was "8/18/08 10.00am"

the code is

string START_TIME =((DataGrid1.Items[i].Cells[1].Text) + " " + (DataGrid1.Items[i].Cells[5].FindControl("Start_Time") as TextBox).Text);

i had populated a datagrid cell with month/date/year like

 DateTime Crnt_Time =DateTime.Now;
        int  day = Crnt_Time.Day;
        int mnth = Crnt_Time.Month;
        int yr = Crnt_Time.Year;
        string  Today = day + "/" + mnth + "/" + yr;

and i have a text box column in my datagrid to enter hours.

wh ...

Go to the complete details ...