String was not recognized as a valid DateTime.
-
2012年3月7日 上午 08:49
Hey Guys I m using a eo web datePicker i dont really have an understanding of the message when i pass the value of the datepicker have to be passed on the database using sqlite.thanks in advance(dtpReceivedDate.SelectedDate)
dtpReceivedDate id name of the datepicker
With appBookCmd.Parameters
.Add("@BookId", CType(SqlDbType.Int, DbType)).Value = CInt(txtBookNo.Text)
.Add("@StartNo", CType(SqlDbType.Int, DbType)).Value = CInt(txtStartNo.Text)
.Add("@EndNo", CType(SqlDbType.Int, DbType)).Value = CInt(txtEndNo.Text)
.Add("@ReceivedDate", CType(SqlDbType.Date, DbType)).Value = dtpReceivedDate.SelectedDate
.Add("@ReasonCode", CType(SqlDbType.VarChar, DbType)).Value = "Unissued"
End With
所有回覆
-
2012年3月12日 下午 07:04
try to pass date as varchar
.Add("@ReceivedDate", CType(SqlDbType..VarChar, DbType)).Value = dtpReceivedDate.SelectedDate.ToString("yyyy-MM-dd")
Regards
Kayden

