I was able to get the expiry date of a certain company in
my database but I have problem on how to view their remaining months before the expiry date.
I have function name kh_expiry which check the expiry date of a company.
SELECT DISTINCT kh_expiry(enrollmentdate), companyidfk FROM enrollment WHERE companyidfk = 101 AND enrollmentstatusidfk = 0;
I tried to have
SELECT DISTINCT kh_expiry(enrollmentdate)-current_date, companyidfk FROM enrollment WHERE companyidfk = 101 AND enrollmentstatusidfk = 0;
i subtract the expiry to the current date but the result gives me like 3 digit numeric, 291 ....
Pleaase help...
thnx!
my database but I have problem on how to view their remaining months before the expiry date.
I have function name kh_expiry which check the expiry date of a company.
SELECT DISTINCT kh_expiry(enrollmentdate), companyidfk FROM enrollment WHERE companyidfk = 101 AND enrollmentstatusidfk = 0;
I tried to have
SELECT DISTINCT kh_expiry(enrollmentdate)-current_date, companyidfk FROM enrollment WHERE companyidfk = 101 AND enrollmentstatusidfk = 0;
i subtract the expiry to the current date but the result gives me like 3 digit numeric, 291 ....
Pleaase help...
thnx!