Skip to content

Instantly share code, notes, and snippets.

@jschang19
Created August 15, 2021 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jschang19/b6ee252f306fb49a5519f462a3b81371 to your computer and use it in GitHub Desktop.
Save jschang19/b6ee252f306fb49a5519f462a3b81371 to your computer and use it in GitHub Desktop.
App Script 取得目前時間的語法。
var current_hour = Utilities.formatDate(new Date(), "Asia/Taipei", "HH");
// 最後的引號是取得時間的格式,HH 是指小時
// 還有 yyyy (year), mm (分), ss (秒 ),更多可以看 App Script 官方說明
// https://developers.google.com/google-ads/scripts/docs/features/dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment