我需要将8个数据库列日期传递给我的CalculateMostRecentDate函数,因为vb6没有max函数。我能简单地传递这样的数据库值吗?或者我该怎么做?
Public Function CalculateMostRecentDate(ParamArray dates() As Variant) As Variant
Dim i As Integer
Dim MostRecentDate As Variant
MostRecentDate = dates(LBound(dates))
For i = LBound(dates) + 1 To UBound(dates)
If MostRecentDate < dates(i) Then MostRecentDate = dates(i)
Next i
CalculateMostRecentDate = MostRecentDate
End Function
在另一个函数中调用函数:
RECENT_APPRV_DT = CalculateMostRecentDate(EMPLOYER.UW_APPRV_DT, EMPLOYER.BE_APPRV_DT, . . .)