• markcejones
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hi,

 

I have 2 custom Date/Time fields for example. 

 

i) L1 = date/time when case is assigned to Level 1 Support

ii) L2 = date/time when case is assigned to Level 2 Support

 

I wanted to calculate the time the Case has spent in L1 Support, for example.  I came up with the following logic:

 

 

IF(IsNull(L2__c), (ClosedDate - L1__c), (L2__c - L1__c)

 

Basically, if L2 is null (ie: Case wasn't assigned to L2), then the time spent in L1 is the ClosedDate - L1.   If L2 is not null (ie: Case was assigned to L2), then the time spent in L1 = L2 - L1. 

 

This is great, but only if the Case is Closed.  

 

What if the Case is still Open, in L1 Support?

 

I've tried several IF(AND(IsNull...but I am receiving missing ')' and expecting boolean, etc.  Is there a way to do nested IFs?

 

Thanks for any tips.

 

-Mark