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?

週末を除いて 2 つのフィールド間の時差を表示する式(DateTime型)

Last updated at Posted at 2023-07-28

/合計日数/(((Email_First_Reply_Date_Time__c - CreatedDate) -
/削除日数を計算します: 週数を数えて 2 を掛けると、合計日数から削除する日数がわかります/ ((Email_First_Reply_Date_Time__c - CreatedDate) / 7) *2) * 1440)
/合計日数に 1 日の分数である 1440 を掛けます/

機能しているのかな?

IF( OR( weekday(datevalue(LastModifiedDate))= 1, weekday(datevalue(LastModifiedDate))= 7),

ROUND( 1440 * 

(( 5 * FLOOR( ( DATEVALUE( NOW() ) - DATE( 1900, 1, 8) ) / 7) + MIN(5, MOD( DATEVALUE(NOW() ) - DATE( 1900, 1, 8), 7) + MIN( 1, 24 / 24 * ( MOD( NOW() - DATETIMEVALUE( '1900-01-08 00:00:00' ), 1 )))))

-

( 5 * FLOOR( ( DATEVALUE( LastModifiedDate) - DATE( 1900, 1, 8) ) / 7) + MIN( 5, MOD( DATEVALUE( LastModifiedDate ) - DATE( 1996, 1, 1), 7 ) + MIN( 1, 24 / 24 * ( MOD( LastModifiedDate - DATETIMEVALUE( '1900-01-08 00:00:00' ), 1)))))),0

) + 119,

ROUND( 1440 * 

(( 5 * FLOOR( ( DATEVALUE( NOW() ) - DATE( 1900, 1, 8) ) / 7) + MIN(5, MOD( DATEVALUE(NOW() ) - DATE( 1900, 1, 8), 7) + MIN( 1, 24 / 24 * ( MOD( NOW() - DATETIMEVALUE( '1900-01-08 00:00:00' ), 1 )))))

-

( 5 * FLOOR( ( DATEVALUE( LastModifiedDate) - DATE( 1900, 1, 8) ) / 7) + MIN( 5, MOD( DATEVALUE( LastModifiedDate ) - DATE( 1996, 1, 1), 7 ) + MIN( 1, 24 / 24 * ( MOD( LastModifiedDate - DATETIMEVALUE( '1900-01-08 00:00:00' ), 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?