In Summer'14 (likely also in Winter'14) there was a very special behavior of the platform to deal with precise datetime calculations as described here: Duration as difference betweed to Datetime fields does not respect Seconds

It ends up that seconds has been disrespected by the platform, so that a formula field Duration__c (in Seconds) defined as

(End__c - Start__c) * 24 * 60 * 60


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

has had evaluated to 0.00 seconds but should have be 2.00 seconds

I have considered this as a bug. (Since we have no premier support, we were never able to interact about this issue with the salesforce support)

At this time, I found a workaround like that:

  ( End__c - Start__c ) * 24 * 60 * 60
+ ( VALUE(MID(TEXT(End__c),18,2)) - VALUE(MID(TEXT(Start__c),18,2)) ) 

But today, this seems to be changed (or fixed if you like). I noticed that because all my calculations with the workaround above are counting the seconds twice. Mmmmm.....

My question is: is that change somewhere documented? E. g. somewhere in the release notes? Is there any good way to be notified in such cases were we find a bug as mere non-premier customers, spend hours to fix it with workarounds and than run into an error, when salesforce has taken actions to fix it on their end so that as a result our workaround turns into a bug?


You must log in to answer this question.

Browse other questions tagged .