Welcome Notes

Welcome Viewers

08 March 2018

Convert Date String To Date through SDK

Dear All,
   Today , We will see, How to Convert Date String To Date through SDK



Public Function ConvertDateStringToDate(ByVal strDateValue As String) As DateTime
        Dim vObj As SAPbobsCOM.SBObob = Nothing
        Dim retDate As DateTime
   
        vObj = oApplication.SAPCompany.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)
        Try
            retDate = Convert.ToDateTime(vObj.Format_StringToDate(strDateValue).Fields.Item(0).Value)
        Catch ex As Exception
            retDate = Nothing
        Finally
           If vObj IsNot Nothing Then
                vObj = Nothing
            End If
        End Try
        Return retDate
    End Function