0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【数式】期日までの営業日ベースの残り日数計算

Posted at

概要

期日 (DueDate__c) に設定された日付までの残り営業日(土日を除く平日の日数)を計算する。

数式

IF(
    DueDate__c < TODAY(),
    "期日超過",
    TEXT(
        DueDate__c - TODAY() - 
        FLOOR((DueDate__c - TODAY() + WEEKDAY(TODAY()) - 1) / 7) * 2 - 
        IF(MOD(WEEKDAY(TODAY()) + DueDate__c - TODAY() - 1, 7) = 6, 1, 0) - 
        IF(MOD(WEEKDAY(TODAY()) + DueDate__c - TODAY() - 1, 7) = 0, 1, 0)
    )
)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?