1

I am getting result after one minute  in formula field like this   0 Days 0 Hours -479 Minutes. I need result like this    0 Days 7 Hours -59 Minutes.

This is my formula but it's not working properly

TEXT( FLOOR(Now() - CreatedDate))  & " Days " &TEXT(
ROUND(MOD((Now() - CreatedDate)*24,24),0) )  &" Hours " &
TEXT(ROUND(MOD((Now() - CreatedDate)*1440,60),0)-480
) &" Minutes "

Please if you have any solution thanks in advance.

  • 1
    To ensure no-one is wasting their time providing a solution - What are you using the countdown for? Are you aware that the formula will not trigger anything? If the record is not accessed then the formula will do nothing until the record is viewed again. Just want to make sure that the ultimate goal you are going for can be met. If it is just display only then no worries – Eric Jul 2 '17 at 18:35
  • Thank santanu for reply i want to subtract 8 hour from this {Now ()-CreatedDate} it can be happen because i not aware of these thing – Md Parwej Jul 2 '17 at 18:46
1

I think this will work, put other boundary condition if that apply.

IF(FLOOR( (NOW()- CreatedDate)) > 0,TEXT( FLOOR( (NOW()- CreatedDate)) ) & " days ", "") 
& TEXT(7 - FLOOR( MOD( (NOW()- CreatedDate)* 24, 24 ) ) ) & " hours " 
& TEXT( 59 - ROUND( MOD( (NOW()- CreatedDate)* 24 * 60, 60 ), 0 ) ) & " minutes "

Created Date is : 7/2/2017 10:38 AM

Current Time is : 7/2/2017 2:53 PM

So, elapsed time is from Created Date: 4 hours and 15 minutes

Formula output: 3 hours 45 minutes

(All times are EST)

  • 1
    Hi Santanu I need to calculate in negative when time hits 0. So, if priority is p1, I need to start from 0 hour 30 min. As per your above solution, If do it for p1, it start adding 1 hour when minutes is -30. But it should add 1 hour only when minutes is -59 or-60th min. Here is my formula, IF( ISPICKVAL(Priority_Time__c, "P1"), IF(FLOOR( (NOW()- CreatedDate)) > 0,TEXT( FLOOR( (NOW()- CreatedDate)) ) & " days ", "") & TEXT(FLOOR( MOD( (NOW()- CreatedDate)* 24, 24 ) ) ) & " hours " & TEXT( 30 - ROUND( MOD( (NOW()- CreatedDate)* 24 * 60, 60 ), 0 ) ) & " minutes ", "not found") – Md Parwej Jul 10 '17 at 11:23

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.