0

I have the following fields on my object: startDate__c and endDate__c.

The length of time between these 2 dates is equal to 100% of the overall timeline.

In a formula field, how can I get today's date as a % of that timeline?

Any help or suggestions would be greatly appreciated.

3
  • What's the exact problem you are facing? Did you already try anything? Jun 29, 2016 at 12:43
  • @Guy I have a progress bar which represents the timeline. As we move from the start date to the end date, the bar fills. If that makes sense.
    – Daft
    Jun 29, 2016 at 12:45
  • I was just hoping you tried something already instead of asking for a ready-made answer. My own experience is that I learn and remember better that way. Jun 29, 2016 at 13:14

1 Answer 1

3

I believe you need something like this

If TODAY is Between START and END dates, 
then 
(END - TODAY) / (END - START)

if that's the case, create a formula % field and try the below formula

IF(
  AND(TODAY() >= startDate__c , TODAY() <= endDate__c),
  (endDate__c - TODAY()) / (endDate__c - startDate__c) ,
  NULL
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .