AddToDate() Can be used to add Number of Years or Months or Date to Date field.
Example:
Function visa_expiratn_dt
Evaluate VISA_PMT_DATA.DURATION_TYPE
When = "Y"
VISA_PMT_DATA.EXPIRATN_DT = AddToDate(VISA_PMT_DATA.ENTRY_DT,
VISA_PMT_DATA.DURATION_TIME, 0, 0);
Break;
When = "M"
VISA_PMT_DATA.EXPIRATN_DT = AddToDate(VISA_PMT_DATA.ENTRY_DT, 0,
VISA_PMT_DATA.DURATION_TIME, 0);
Break;
When = "D"
VISA_PMT_DATA.EXPIRATN_DT = AddToDate(VISA_PMT_DATA.ENTRY_DT, 0, 0,
VISA_PMT_DATA.DURATION_TIME);
Break;
End-Evaluate
End-Function;
0 comments:
Post a Comment