Below sScript will help to get today's date with next year.
Today: 08/10/2021
Result: 08/10/2022
var CurrentDate, DateEnd, DD, MM, YYYY;
if (DateEnd == "")
{
//Next Year Date
CurrentDate = new Date;
//Tue Aug 10 2021 13:30:45
DD = CurrentDate.getDate();
MM = (CurrentDate.getMonth() + 1);
YYYY = (CurrentDate.getFullYear() + 1);
DateEnd = ToNumber(MM) + "/" + ToNumber(DD) + "/" + ToNumber(YYYY);
//Outputs.SetProperty("OutTest",DateEnd);
}
Comments
Post a Comment