AnsweredAssumed Answered

Days until Expiry

Question asked by hrcap on Sep 6, 2013
Latest reply on Sep 6, 2013 by philmodjunk

Title

Days until Expiry

Post

     Afternoon All

      

     I have made a field to work out the days until the expiry of a certificate, the calculation also turns the number of days to an amber colour if there are less than 28 days but more than 0 days to expiry.

     At the moment this calculation works fine unless there are between 3-9 days to expiry in which case it does not change the colour of the text.

     Any input would be appreciated.

      

     please see the calculation below:

      

      

     Let(
      
     @Expiry_Days = TextFormatRemove ( ( expiry_date - (Get(CurrentDate) ))) ;
      
      
      
     Case(
      
     expiry_date_portal = ""  ; "" ;
      
     expiry_date_portal = "N/A"  ; TextFormatRemove( "N/A") ;
      
     @Expiry_days  ≤ 28 and
      
     @Expiry_days  > 0 ;
      
     TextColor(@Expiry_days; RGB(255;127;0)) ;
      
     @Expiry_days  ≤ 0 ;
      
     TextColor(@Expiry_days; RGB(255;0;0)) ;
      
     @Expiry_days
      
     )
      
     )
      
      
      
     many thanks
      
     Hadleigh

Outcomes