Friday, July 29, 2022

Convert From date and to date in Julian , JD Edwards in VBA

 

    Dim FrmDateImp

    Dim ToDateImp

    Dim tmpToDateImp

 

   

    FrmDateImp = Right(STR(PERIOD_BEG), 2) & "/01/" & Mid(str(PERIOD_BEG), 2, 4)

    tmpToDateImp = Right(STR(PERIOD_END), 2) & "/01/" & Mid(str(PERIOD_END), 2, 4)

    ToDateImp = DateSerial(YEAR(tmpToDateImp), Month(tmpToDateImp) + 1, 0)

 

   

    Dim FrmDate_DGJ As Long

    Dim ToDate_DGJ As Long

  FrmDate_DGJ = ((DatePart("YYYY", FrmDateImp) - 1900) * 1000) + DatePart("y", FrmDateImp)

ToDate_DGJ = ((DatePart("YYYY", ToDateImp) - 1900) * 1000) + DatePart("y", ToDateImp)

QryDateSummaryStr = "GLDGJ BETWEEN '" & FrmDate_DGJ & "' and '" & ToDate_DGJ & "'"


No comments: