This content has been marked as final. Show 3 replies
Why not leave it as days left? M,D,Y is relative to your defininition of it. For example, what is considered a month in terms of 75 days?
Calculation doesn't look quite right. Try:
yearlength = 365.25;
monthlength = 365.25/12;
daysleft = Expiry Date - get ( currentdate );
years = Div ( daysleft; yearlength );
months = Div ( mod ( daysleft; yearlength ); monthlength );
days = int ( mod ( mod ( daysleft; yearlength ); monthlength ) )
case ( years > 0; years & " years, " ) &
case ( months > 0; months & " months, " ) &
days & " days"
Thank you so much to etripoli.....It works.