Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get day from a date and automatically add days
#1
Script:-
var today = new Date(d);
var day=today.getDay();


if(day==1)
{
var days5 = new Date(new Date().setDate(today.getDate() + 5));
   var full5=days5.getFullYear()+'-'+(days5.getMonth() + 1)+'-'+days5.getDate();
sdk.setValue( 'date104',full5  );
}
else if((day==2)||(day==3)||(day==4)||(day==5)||(day==6))
{
var days6 = new Date(new Date().setDate(today.getDate() + 6));
   var full6=days6.getFullYear()+'-'+(days6.getMonth() + 1)+'-'+days6.getDate();
sdk.setValue( 'date104',full6  );
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)