Skip to main content

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

Hello there @Jguido,

I think @rob might be able to help here 🙂


@rob Can you help with this?


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})


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


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


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 !


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 👍


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


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})