Forum Discussion

rcister's avatar
rcister
Frequent Visitor
5 years ago
Solved

cister

Ey how are u?
I have a question.
I have a column that is=
date[date1] - date[date2], 
and it show me the diference IN DAYS bewteen both, and is ok!
BUT how can i show that difference in month or week eg: if I have 60 days, I need to see that 60 days of difference, i need to shows that 60 days in 2 month

  • Hey rcister ,

     

    you can use the DATEDIFF function and chose the interval for the difference:

    Diff in Month = DATEDIFF(date[date1], date[date2], MONTH)

     

    Or for example in years:

    Diff in Year= DATEDIFF(date[date1], date[date2], YEAR)

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

1 Reply

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey rcister ,

     

    you can use the DATEDIFF function and chose the interval for the difference:

    Diff in Month = DATEDIFF(date[date1], date[date2], MONTH)

     

    Or for example in years:

    Diff in Year= DATEDIFF(date[date1], date[date2], YEAR)

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis