Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Need help with complicated date based formula

Topic Labels: Data Formulas
725 2
cancel
Showing results for 
Search instead for 
Did you mean: 
ta2530
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all - I need help with this formula as I was able to use Chat GPT to get me close to where I need to be, but it still doesn't work.

Can someone rewrite this formula so it works: 

IF({End Date} > "7/1/2024" {Latest Revenue Projections} ("6/30/2024"{Start Date}+1({End Date} {Start Date}+1) , "")

2 Replies 2
Brian_Sweeny
6 - Interface Innovator
6 - Interface Innovator

Hi! Can you explain what you are trying to do here?

Dan_Montoya
Community Manager
Community Manager

It looks like you are trying to calculate the number of days to determine the % of the quarter complete or something similar to that.  In that case you need to use datetime_diff(start, end, 'days').

IF({End Date} > "7/1/2024" {Latest Revenue Projections} ("6/30/2024"{Start Date}+1({End Date} {Start Date}+1) , "")

would look something like:

IF({End Date} > "7/1/2024" , {Latest Revenue Projections} * datetime_diff("6/30/2024", {Start Date}, 'days') / datetime_diff({End Date}, {Start Date}) , "")

 

Not sure what the +1 is doing since you didn't provide more detail around.  But to address your question, you need to use datetime_diff to subtract one date from another date.