Extended formular function datetime\diff

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfr
    Member
    • Jul 2021
    • 52

    Extended formular function datetime\diff

    Hello Devs,

    datetime\diff(VALUE_1, VALUE_2, INTERVAL_TYPE)​ returns the difference between two dates or datetimes by the given INTERVAL_TYPE.

    To calculate only workdays, there should be a attribute for a weekend number like the EXCEL function NETWORKDAYS.INTL.

    Please take a look at the added link, for an example implementation.


    Best regards
    Martin
    NETWORKDAYS.INTL returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days. Weekend days and any days that are specified as holidays are not considered as workdays.
  • yuri
    Member
    • Mar 2014
    • 8452

    #2
    Unlikely to be implemented for this function.

    You can use ext\workingTime\getWorkingDays instead: https://docs.espocrm.com/user-guide/...mula-functions
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • mfr
      Member
      • Jul 2021
      • 52

      #3
      Originally posted by yuri
      Unlikely to be implemented for this function.

      You can use ext\workingTime\getWorkingDays instead: https://docs.espocrm.com/user-guide/...mula-functions
      I didn't know this function before. It's work like a charm. Thanks for the hint!

      Comment

      Working...