Let's Reconnect, thank you for making 2022 our best year yet.

Dependent Coverage End Date Fast Formula — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content.

# Dependent Coverage End Date Fast Formula

16
Views
9
edited Jul 2, 2021 6:14AM in Benefits 9 comments

# Summary

Need a Fast Formula for Dependent Coverage End Date

# Content

We have a requirement, when dependent turns 30 years, the coverage should end on last day of the Year. I have writen below FF but it is not working. TO calculate the age of dependent I use a DBI, it is picking the employee's DOB. Can someone help me to improve this FF.

21A

# Code Snippet

```DEFAULT FOR PER_PER_DATE_OF_BIRTH is '1951/01/01 0:00:00'(date)
DEFAULT FOR BEN_PIL_LF_EVT_OCRD_DT is '1950/01/01 00:00:00'(date)

l_age = 0
l_eff_date = BEN_PIL_LF_EVT_OCRD_DT
l_eff_date_year = TO_CHAR(BEN_PIL_LF_EVT_OCRD_DT,'YYYY')
l_cov_end_date = '12/31/'||l_eff_date_year
l_dob = PER_PER_DATE_OF_BIRTH

l_log_data = ESS_LOG_WRITE('FF Start BEN_DEP_CVG_END_DATE')
l_log_data = ESS_LOG_WRITE('l_eff_date: '||TO_CHAR(l_eff_date))
l_log_data = ESS_LOG_WRITE('l_eff_date_year: '||l_eff_date_year)
l_log_data = ESS_LOG_WRITE('l_cov_end_date: '||l_cov_end_date)
l_log_data = ESS_LOG_WRITE('l_dob: '||TO_CHAR(l_dob))
l_log_data = ESS_LOG_WRITE('Age: '||TO_CHAR(MONTHS_BETWEEN(l_eff_date,l_dob)))

IF ( MONTHS_BETWEEN(l_eff_date,l_dob) = 360 ) THEN
(
l_output = TO_DATE(l_cov_end_date)
)

l_log_data = ESS_LOG_WRITE('FF End BEN_DEP_CVG_END_DATE')

return l_output```