M
Maileen
Hi,
I have the following code :
Function GetRequestType(ByVal EvDt As String, ByVal StPeriod As String,
ByVal EdPeriod As String, ByVal TaskType As String) As Integer
Dim strtest As String
Dim i, j As Integer
i = strtest.Compare(EvDt,StPeriod)
Select Case (TaskType)
Case "Old"
If (i < 0) Then 'EvDt is before StPeriod
Return (1)
Else
Return (0)
End If
Case "New"
If (i >= 0) Then 'EvDt is after of equal to StPeriod
j = strtest.Compare(EvDt, EdPeriod)
If (j < 0) Then 'EvDt is before EndPeriod (so, between
StPeriod and EdPeriod
Return (1)
End If
Else
Return (0)
End If
End Select
End Function
unfortunately, it does not work well...
if EvDt < StPeriod, i >0...and it should be i<0....
for example :
EvDt = 02.01.2005
StPeriod = 01.06.2005
thus i >0, how is it possible ?
thanks a lot,
Maileen
I have the following code :
Function GetRequestType(ByVal EvDt As String, ByVal StPeriod As String,
ByVal EdPeriod As String, ByVal TaskType As String) As Integer
Dim strtest As String
Dim i, j As Integer
i = strtest.Compare(EvDt,StPeriod)
Select Case (TaskType)
Case "Old"
If (i < 0) Then 'EvDt is before StPeriod
Return (1)
Else
Return (0)
End If
Case "New"
If (i >= 0) Then 'EvDt is after of equal to StPeriod
j = strtest.Compare(EvDt, EdPeriod)
If (j < 0) Then 'EvDt is before EndPeriod (so, between
StPeriod and EdPeriod
Return (1)
End If
Else
Return (0)
End If
End Select
End Function
unfortunately, it does not work well...
if EvDt < StPeriod, i >0...and it should be i<0....
for example :
EvDt = 02.01.2005
StPeriod = 01.06.2005
thus i >0, how is it possible ?
thanks a lot,
Maileen