Tam olarak formüle edilmiş hali şurada var:
https://www.briandunning.com/cf/680
Let(
[
availableDates = Case (
not IsEmpty(startDate) and IsValid(startDate) and not IsEmpty (finishDate) and IsValid(finishDate) ; "both" ;
not IsEmpty(startDate) and IsValid(startDate) and IsEmpty (finishDate) ; "start" ; "none" ) ;
days = Case (
availableDates = "both" ; finishDate - startDate ;
availableDates = "start" ; Get(CurrentDate) - startDate ) ;
months = Round ( days/30 ; 0 ) ;
years = Round ( days/365.25 ; 0 )
]
;
Case (
returnType = "d" ; days ;
returnType = "m" ; months ;
returnType = "y" ; years )
)
Test etmedim.