if(ri!vfm_lastupdate<today()+730,"new",if(or((ri!vfm_lastupdate > today()+731),(ri!vfm_lastupdate>=today()+1440)), "refurbished",if(ri!vfm_lastupdate>today()+1828,"Testing Required","Null")))
here i need to check if the given date is less than 2 years compared to present date then show new, else between 2-5 display refurbished else more than 5 years display testing required
Discussion posts and replies are publicly visible
What about fn!edate() for adding months?
if( ri!vfm_lastupdate>fn!edate(today(),60),"Testing Required", if( ri!vfm_lastupdate>fn!edate(today(),24),"Refurbished", "New" ) )
Edit: Didn't notice Stefan recommended edate() earlier :)
is the last updated date supposed to be compared with 2 years in future or two years older? According to the requirement I feel the requirement is to check in the past.
if( ri!vfm_lastupdate > today() - 730, "new", if( ( ri!vfm_lastupdate < today() - 731 ), if( ri!vfm_lastupdate > today() - 1826, "testing required", if( ri!vfm_lastupdate > today() - 1827, "refurbished", "null" ) ), "Null" ))