Hi,
The code below will give you the number of years, months, days:
Assuming Date1 and Date2 are 2 clarion dates (ie two long)
NbYears#=Year(Date2)-Year(Date1)
Date1=Date(Month(Date1),Day(Date1),Year(Date1)+nbYears#)
NbMonth#=month(Date2) - month(Date1)
If NbMonth# < 0 Then
NbYears#=NbYears# - 1
NbMonth#=NbMonth# + 12
End
Date2=Date(Month(Date2)+NbMonth#,Day(Date2),Year(Date2))
nbDays#=Day(Date2) - Day(Date1)
If nbDays# < 0 Then
NbMonth# = NbMonth# - 1
If NbMonth# < 0 Then
NbYears# = NbYears# - 1
NbMonth# = NbMonth# + 12
End
nbDays# = nbDays# + Day(Date1)
End
Message(NbYears#&'|'&NbMonth#&'|'&nbDays#)
I have not tested it, but it should work after a bit of debug...
Valery.