General Caster formula for the difference between 2 dates

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 :slightly_smiling_face:

2 Likes

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

1 Like

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