Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Invalid date Value

Dear members,

In a form, I have a textfield to enter date and it is linked with Userdatasource - Date.

When I try to retrieve data from the table to show in the form, I got an exception ' Invalid date'. Can anyone help to resolve this problem?

objForm.DataSources.UserDataSources.Add("U6", SAPbouiCOM.BoDataType.dt_DATE

objText.DataBind.SetBound(True, "", "U6"))

If Not objRS.EoF Then

objForm.Items.Item("B4").Specific.string = objRS.Fields.Item("U_BatchnumLength").Value

Dim strdate As Date = objAddOn.objGenFunc.GetDateTimeValue(objRS.Fields.Item("U_FirstInsBatchNum").Value)

objForm.Items.Item("B6").Specific.value = strdate

objForm.Items.Item("B8").Specific.value = objAddOn.objGenFunc.GetDateTimeValue(CStr(objRS.Fields.Item("U_FreshBatchNumber").Value))

objForm.Items.Item("B10").Specific.string = CStr(objRS.Fields.Item("U_Separator").Value)

End if

Thanks and Regards,


Former Member
Not what you were looking for? View more on this topic or Ask a question