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?

Salesforceで数式(日付)を作成しよう~生年月日から今年の誕生日を表示させる方法

Posted at

本橋孝昭です

今回はSalesforceの日付項目から今年の誕生日を表示させる方法を解説します

この数式項目を作成すると 日付項目から今年の誕生日を表示させることが出来るので便利です

今回は取引先責任者のBirthdate項目を使います

数式はこちら

DATE(YEAR(TODAY()),MONTH( Birthdate ),DAY(Birthdate))

image.png

この数式であれば Birthdate項目に1999年6月1日と記載されていれば(今は2024年なので)数式項目には2024/6/1 と表示されます

なお、上記数式はうるう年は加味してません

うるう年を加味した数式はこちら

ADDMONTHS( Birthdate , ( YEAR( TODAY() ) - YEAR( Birthdate ) ) * 12 )

image.png

※参考リンク

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?