Skip to main content

General Caster formula for the difference between 2 dates

  • February 28, 2023
  • 10 replies
  • 971 views

  • Participating Frequently

I need a formula that works with General Caster that will allow me calculate the number of days between 2 given dates. Can anyone help me with this?

Example-
1/3/2023 and 1/4/2023 would = 1
1/3/2023 and 1/5/2023 would = 2
1/3/2023 and 1/2/2023 would = -1

10 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • March 1, 2023

Hello there @Jguido,

I think @rob might be able to help here 🙂


  • Author
  • Participating Frequently
  • March 1, 2023

@rob Can you help with this?


rob
Forum|alt.badge.img
  • monday.com Partner
  • March 2, 2023

Hey @Jguido
You can calculate the difference in days between two dates using the following GC formula.

DATEVALUE({item's First Date}) - DATEVALUE({item's Second Date})


  • Author
  • Participating Frequently
  • March 2, 2023

@rob It keeps saying unexpected error and doesn’t load the number


  • Author
  • Participating Frequently
  • March 7, 2023

I Solved it.
The correct formula is:
DAYS({item’s First Date},{item’s Second Date})


  • New Participant
  • June 14, 2024

Hello,

I was looking for the same solution but it looks like this formula doesn’t work anymore as the automation fails.
I have tried the first mentioned solution using DATEVALUE or TEXT(DATEVALUE) mentioned in the GC documentation, it doesn’t work either.

Any idea what might have changed?
Thank you !


  • Author
  • Participating Frequently
  • June 14, 2024

I think the formula I ended up using was:

DAYS({Date Column 1},{Date Column 2})

I just ran the automation on my end to make sure it works and it does for me. Hope that helps 👍


  • New Participant
  • June 14, 2024

Thanks For the quick reply 🙏.
I will test this again.
You confirm that this formula is meant to be working with General Caster, right ?


rob
Forum|alt.badge.img
  • monday.com Partner
  • June 14, 2024

No, it doesn’t work in General Caster.
That’s a formula working in the Formula column.

Here’s the correct formula for General Caster.

DATEVALUE({item's To Date}) - DATEVALUE({item's From Date})


  • Author
  • Participating Frequently
  • June 14, 2024