Warning: include_once(/home/officeinti/office-inti.com/public_html/wp-content/plugins/rich-table-of-content/include/rtoc_edit.php): failed to open stream: No such file or directory in /home/officeinti/office-inti.com/public_html/wp-content/plugins/rich-table-of-content/functions.php on line 167

Warning: include_once(): Failed opening '/home/officeinti/office-inti.com/public_html/wp-content/plugins/rich-table-of-content/include/rtoc_edit.php' for inclusion (include_path='.:/opt/php-7.4.33-2/data/pear') in /home/officeinti/office-inti.com/public_html/wp-content/plugins/rich-table-of-content/functions.php on line 167
[Google SpreadSheet]スプレッドシートの日付関連関数いろいろ | Office INTI

[Google SpreadSheet]スプレッドシートの日付関連関数いろいろ

よく使う関数を集めました

今日の日付

=now()

指定日数先(後)の年月日を計算

=[日付型セル]+加算(減算)日数
'例:今日の日付から50日先
=now()+50

指定’月’数先(後)の年月日を計算

=edate([日付型セル],[加算(減算)月数])
'例:今日の日付から5か月先の日付
=edate(now(),5)

2つの日付の間の期間を計算

=datedif([古い方の日付],[新しい方の日付],[計算の型指定])
'A1セルの日付とA2セルの日付の間の月数を表示
=datedif(A1,A2,"M")

※いろいろと工夫し甲斐のある関数
たとえば2つのセルの間の期間をO年O月で表示したい場合は・・・

=datedif(<セルA>,<セルB>,"Y")&"年"&datedif(<セルA>,<セルB>,"YM")&"月"
'セルBを「=now()」関数にすれば、セルAの日から何年何月経過したかを計算できる

シェアする

  • このエントリーをはてなブックマークに追加

フォローする