Hi,
One simple question.
How to print Yesterday date in JavaScript code activity log.
Regards
Abhishek
Solved! Go to Solution.
Views
Replies
Total Likes
One way to do it:
var d = new Date();
d.setDate(d.getDate()-1);
logInfo("Yesterdays date was: " + d.toLocaleString());
Output:
09/04/2020 13:24:33 js Yesterdays date was: Wed Apr 8 13:24:33 2020
Depending on what you need, you can refine the date format further using Javascript
One way to do it:
var d = new Date();
d.setDate(d.getDate()-1);
logInfo("Yesterdays date was: " + d.toLocaleString());
Output:
09/04/2020 13:24:33 js Yesterdays date was: Wed Apr 8 13:24:33 2020
Depending on what you need, you can refine the date format further using Javascript
Views
Replies
Total Likes
.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies