SOLVED

# Datedif, when I had the end date stop counting, it is possible

Occasional Contributor

# Datedif, when I had the end date stop counting, it is possible

I have the formula to calculate the DATEDIF Dates with the function today, I would like that when I had the end date stop counting, it is possible.

My formula.

=IF(LEN([@[Data da Licença]])=0;" ";DATEDIF( [@[Data da Licença]];TODAY();"y") & " anos " & MOD(DATEDIF([@[Data da Licença]];TODAY();"ym");12) & " meses " & MOD(MOD(DATEDIF( [@[Data da Licença]];TODAY();"md");365);12) & " dias")

4 Replies

# Re: Datedif, when I had the end date stop counting, it is possible

Try

=IF([@[Data da Licença]]="";"";IF([@[Data da Retorno]]="";DATEDIF([@[Data da Licença]];TODAY();"y") & " anos " & DATEDIF([@[Data da Licença]];TODAY();"ym") & " meses " & DATEDIF([@[Data da Licença]];TODAY();"md") & " dias");DATEDIF([@[Data da Licença]];[@[Data da Retorno]];"y") & " anos " & DATEDIF([@[Data da Licença]];[@[Data da Retorno]];"ym") & " meses " & DATEDIF([@[Data da Licença]];[@[Data da Retorno]];"md") & " dias"))

# Re: Datedif, when I had the end date stop counting, it is possible

unfortunately it didn't work,

# Re: Datedif, when I had the end date stop counting, it is possible

Sorry, there were a few typos.

=IF([@[Data da Licença]]="";"";IF([@[Data de Retorno]]="";DATEDIF([@[Data da Licença]];TODAY();"y") & " anos " & DATEDIF([@[Data da Licença]];TODAY();"ym") & " meses " & DATEDIF([@[Data da Licença]];TODAY();"md") & " dias";DATEDIF([@[Data da Licença]];[@[Data de Retorno]];"y") & " anos " & DATEDIF([@[Data da Licença]];[@[Data de Retorno]];"ym") & " meses " & DATEDIF([@[Data da Licença]];[@[Data de Retorno]];"md") & " dias"))

best response confirmed by Gildo_Pinheiro (Occasional Contributor)
Solution

# Re: Datedif, when I had the end date stop counting, it is possible

its work perfectly, thank you very much