1
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?

More than 3 years have passed since last update.

Google Apps Script で日付をフォーマットする

Posted at
var formattedDate = Utilities.formatDate(new Date(), "JST", "yyyy-MM-dd (E) HH:mm:ss Z");
Logger.log(formattedDate);

結果 2020/09/28 (Mon) 15:29:24 +0900

date = new Date():DateStringとしての形式に
timeZone= "GMT":結果の出力タイムゾーン
format = "yyyy-MM-dd":SimpleDateFormat仕様ごとのフォーマット

公式のドキュメントはこちら

Apps Script

下記のサイトに詳しく書いてあります。

Google Apps Script メモ formatDate

1
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
1
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?