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?

WEEKDAY関数

Last updated at Posted at 2022-04-13

案外この数式の質問が多い。毎回返り値の 1 は何?って考えるのでここにまとめておきます。

1:日曜日
2:月曜日
3:火曜日
4:水曜日
5:木曜日
6:金曜日
7:土曜日

2日後で週末を避ける場合

CASE(
WEEKDAY(TODAY()),
1,2,
2,2,
3,2,
4,2,
5,4,
6,4,
7,3,
0 )

image.png

3日後で週末を避ける場合

CASE(
WEEKDAY(TODAY()),
1,3,
2,3,
3,3,
4,5,
5,5,
6,5,
7,4,
0 )

image.png

特定の曜日を求める

$Flow.CurrentDate +
CASE( WEEKDAY ( $Flow.CurrentDate ),
1,4,
2,3,
3,2,
4,1,
5,0,
6,-1,
-2)

Formula to return certain day during the week

営業日として30日を加えた日を求める

CASE( WEEKDAY(date_field__c + 30),
2,date_field__c + 41,
3,date_field__c + 40,
date_field__c + 42)

image.png

前の週の月曜日を求める

Excel formula to calculate Monday of the previous week

excelもSalesforceと同じで日曜日が1

日付に対応する曜日を返します。 既定では、戻り値は 1 (日曜) から 7 (土曜) までの範囲の整数となります。

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?