Locked String was not recognized as a valid DateTime.

  • Wednesday, March 07, 2012 8:49 AM
     
     

    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

All Replies

  • Monday, March 12, 2012 7:04 PM
     
     

    try to pass date as varchar

    .Add("@ReceivedDate", CType(SqlDbType..VarChar, DbType)).Value = dtpReceivedDate.SelectedDate.ToString("yyyy-MM-dd")

    Regards

    Kayden