I have a below code written in js activity. I need to add 1 hour to the variable currDate. How can I do that? I tried with setHour() and + operator without luck.
vars.currDate = new Date();
logInfo("vars.currDate----------" + vars.currDate);
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Hello @RajeshBhat This is how the setHours will work.
var now = new Date();
logInfo("Current Date: "+ now.toISOString());
now.setHours(now.getHours() + 1);
logInfo("New time (1 hour ahead): " + now.toISOString());
조회 수
답글
좋아요 수
Hello @RajeshBhat This is how the setHours will work.
var now = new Date();
logInfo("Current Date: "+ now.toISOString());
now.setHours(now.getHours() + 1);
logInfo("New time (1 hour ahead): " + now.toISOString());
조회 수
답글
좋아요 수
조회 수
Likes
답글
조회 수
Likes
답글