Skip to main content

Help with DATETIME_DIFF Formula

  • July 19, 2022
  • 7 replies
  • 84 views

Hi team,

I’m hoping for some help. I am trying to work out the number of weeks between 2 dates. It keeps returning the results Nan and I have no idea what I am doing wrong. Here is the formula I am using.

I want to know how many weeks between “Cancel Date” and “Sale Date”. If anyone could give some input or advise it would be massively appreciated. Thanks

DATETIME_DIFF(
{Cancel Date},
{Sale Date (from Sales)},
‘weeks’
)

7 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hey Peta, hmm that looks right. Could you provide a screenshot of the relevant tables / fields so that I could troubleshoot it perhaps?

In the meantime, I’ve set something up here for you that you can use to compare against your own base



  • Author
  • New Participant
  • July 19, 2022

Thanks so much for your help Adam. Here are 2 screen shots


TheTimeSavingCo
Forum|alt.badge.img+31

Thanks so much for your help Adam. Here are 2 screen shots


Hey Peta, it looks like the Cancel Date field is a Single Line Text field; could you try changing it into a Date field?


  • Author
  • New Participant
  • July 19, 2022

OMG you are my hero!!! It works!!! thank you so much!!! I really really appreciate your help. Thank you!


Forum|alt.badge.img+2

@Adam_TheTimeSavingCo Hi Adam, could you also check my formula? I’m having the same problem as @Peta_Howlett but both fields, in my case, are already in Date format.



TheTimeSavingCo
Forum|alt.badge.img+31

@Adam_TheTimeSavingCo Hi Adam, could you also check my formula? I’m having the same problem as @Peta_Howlett but both fields, in my case, are already in Date format.



Hi Anita, your problem’s probably to do with the formatting of the Duration field I reckon

Try setting it to Integer instead of Duration


Forum|alt.badge.img+2

Thanks so much for your help. It worked!