Hi,
I am getting the error "the conversion of a char data type to a datetime data type resulted in an out-of-range datetime value in asp.net" when i insert date value into table.
aspx.code
---------
Private [date] As String = DateTime.Now.ToString
StrQry = ""
Conn.Open()
StrQry = "insert into csproject(projectname,projectcode,duration,CreatedBy,CreatedDate) values ('" & txtProjName.Text & "','" & txtProjCode.Text & "','" & Session("EmpNo") & "','" & [date] & "')"
Cmd.Connection = Conn
Cmd.CommandText = StrQry
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Conn.Close()
What is the problem here...
My "CreatedDate" column datatype is datetime.
pls. help
Regards,
Ganesh.S