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.
No comments:
Post a Comment