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?

kintoneで日付から日付に日付計算して入力する方法

Posted at

多分もっと早いいい方法がありそうですが備忘録

        var date1 = new Date(
          event.record["date1"].value
        )
        //とりあえず三日前
        date1.setDate(date1.getDate() -3);
        event.record["date2"].value =date1.toLocaleDateString("ja-JP", {year: "numeric",month: "2-digit",day: "2-digit"}).replaceAll("/","-")
0
0
1

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?