hi all, i'm trying to insert the time/date a button was clicked on a gridview and it generates an error:the string was not recognized as a valid DateTime.There is an unknown word starting at index 0 i have changed the culture to en-US but it still doesn't work. i actually created the date/time column after some data had been entered into the table so the column allows nulls. this is my code:
InsertCommand=" INSERT INTO test101(Surname ,Names,Registra tion,Date/Time)VALUES (@Surname, @Names, @Registration,@ DateTime,getdat e())"
<Insert Parameters><asp :Parameter DefaultValue= DateTime.Now() Type=DateTime Name="DateTime" /></Insert Parameters>
any suggestions?
InsertCommand=" INSERT INTO test101(Surname ,Names,Registra tion,Date/Time)VALUES (@Surname, @Names, @Registration,@ DateTime,getdat e())"
<Insert Parameters><asp :Parameter DefaultValue= DateTime.Now() Type=DateTime Name="DateTime" /></Insert Parameters>
any suggestions?
Comment