0
1

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.

Automation 360上でJavaScriptを使ってUnix時間を取得する

Last updated at Posted at 2021-05-21

APIを叩くときにちょっと必要になったので、自分のメモを兼ねて貼っておきます。
JavaScriptの部分は @keng0o さんの JSでUNIXのタイムスタンプを取得する - Qiita を丸ごとお借りしています。

Botの完成イメージ

image.png

1. JavaScript: 開く

image.png

コード部分

function getUnixTime(){
timeStamp = Math.round((new Date()).getTime() / 1000);
return timeStamp
} 

2. JavaScript を実行

出力する変数名は適宜変更してください。
image.png

3. JavaScript: 閉じる

image.png

4. メッセージボックス

image.png

実行結果

こんな感じで取得できたら成功です。
image.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?