Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.
5 answers
  1. Jun 13, 2022, 10:18 PM

    Kinda like this? 

     

    Documentation

    Sample Date Formulas 

     

    Find the Elapsed Time Between Date/Times  

    To find the difference between two Date values as a number, subtract one from the other like so: date_1 — date_2 to return the difference in days.

    Finding the elapsed time between two Date/Time values is slightly more complex. This formula converts the difference between two Date/Time values, datetime_1 and datetime_2, to days, hours, and minutes.

    IF(

    datetime_1 - datetime_2 > 0 ,

    TEXT( FLOOR( datetime_1 - datetime_2 ) ) & " days "

    & TEXT( FLOOR( MOD( (datetime_1 - datetime_2 ) * 24, 24 ) ) ) & " hours "

    & TEXT( ROUND( MOD( (datetime_1 - datetime_2 ) * 24 * 60, 60 ), 0 ) ) & " minutes",

    ""

    )

Loading
0/9000