Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Darren_Bowers
Darren_BowersAccepted solution
Level 9
Apr 9, 2020 3:29 AM UTC

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

3 replies

Darren_Bowers
Darren_BowersAccepted solution
Level 9
Apr 9, 2020 3:29 AM UTC

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

Translate
Darren_Bowers
Level 9
Apr 9, 2020 3:30 AM UTC
wow that code formatter is terrible...
Translate