hexchad2009
June 2nd, 2009, 11:57 PM
Hi guys,
I have a problem obtaining the current age. Wherein the crystal computes the age by year as i use the DATEDIFF function. Is there any other way to compute the current age including the difference. Below is the code.
ClientDetailDOB = 5/27/1939
CurrentDate = 5/1/2009
Age as of currentdate : 69 years old there is a difference of 26 days to go before it turns 70. Now in crystal using DateDiff it returns 70 using the code below.
I need help. Thanks in advance.
Code:
varDOB = DateDiff("yyyy", ClientDetailDOB, CurrentDate)
ElseIf varDOB > 64 And varDOB <= 69 Then
If (varCDA < 11) Then
cInsurance = 17
ElseIf (varCDA >= 11) And (varCDA <= 15) Then
cInsurance = 7
Else
cInsurance = 0
End If
ElseIf varDOB = 70 Then
If (varCDA < 11) Then
cInsurance = 12
Else
cInsurance = 0
End If
I have a problem obtaining the current age. Wherein the crystal computes the age by year as i use the DATEDIFF function. Is there any other way to compute the current age including the difference. Below is the code.
ClientDetailDOB = 5/27/1939
CurrentDate = 5/1/2009
Age as of currentdate : 69 years old there is a difference of 26 days to go before it turns 70. Now in crystal using DateDiff it returns 70 using the code below.
I need help. Thanks in advance.
Code:
varDOB = DateDiff("yyyy", ClientDetailDOB, CurrentDate)
ElseIf varDOB > 64 And varDOB <= 69 Then
If (varCDA < 11) Then
cInsurance = 17
ElseIf (varCDA >= 11) And (varCDA <= 15) Then
cInsurance = 7
Else
cInsurance = 0
End If
ElseIf varDOB = 70 Then
If (varCDA < 11) Then
cInsurance = 12
Else
cInsurance = 0
End If