Quantcast
Channel: Pochampalli IT Labs
Viewing all articles
Browse latest Browse all 261

How to get currentDate+1day (Tomorrow's date) in m/dd/yyyy format in postman

$
0
0

In Postman Tests section write below code. 

const currentDate = new Date();

currentDate.setDate(currentDate.getDate() + 1);

const formattedDate = `${currentDate.getMonth() + 1}/${currentDate.getDate()}/${currentDate.getFullYear()}`;

console.log(formattedDate);




Example : 

If today's date is 9/21/2023 then we get 9/22/2023 in the console log.


Viewing all articles
Browse latest Browse all 261

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>