ma ouml

ma ouml

  • NA
  • 436
  • 88k

How to count the number of years between two dates

Jun 12 2017 5:29 PM
Hi friends,
I will rest my question because I did not turn the good answer
I want to calculate the number of years between start date and end date in crystal report
I have tested many functions in crystal report like this one DateDiff ("yyyy", {decompte.Date_demarrage}, {decompte.Date_fin}): in case the number of years = 1 it shows me 1.00
In case of the number of years <1 it shows me for example 260
I do not want it like that I want when the number of years == 1 shows me 1
When the number is less than 1 it shows me 1 and so on
I will be very happy if I find someone who can help me
And thanks in advance friends

Answers (2)