4

It seems that Seconds are ignored in formula fields if you create the difference between Datetime/Time fields.

Say you have two Datetime fields: End__c and Start__c

Take a formula field Duration__c (in Seconds) defined as

(End__c - Start__c) * 24 * 60 * 60

Assume

  • End__c is "2014-08-31T18:52:40.000+0000"
  • Start__c is "2014-08-31T18:52:38.000+0000"

Duration__c evaluates to 0.00 seconds but should be 2.00 seconds

2

You can modify the formula to include Seconds into the evaluation

  ( End__c - Start__c ) * 24 * 60 * 60
+ ( VALUE(MID(TEXT(End__c),18,2)) - VALUE(MID(TEXT(Start__c),18,2)) ) 
  • 1
    Uwe - you might want to mark this as 'solved' – cropredy Nov 8 '14 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.