Avatar

Level 3

In ACC WebApp I am trying to get the number of days between System date and Offer date with the below syntax but I dont get anything, even tried converting just to "%2M/%2D/%4Y" that also does not work when used with DaysDiff function. 

 

ctx.vars.OfferDate= formatDate(ctx.recipient.Offer_Date,"%2M/%2D/%4Y %02H:%02N:%02S");

ctx.vars.SysDate = formatDate(getCurrentDate(),"%2M/%2D/%4Y %02H:%02N:%02S")

ctx.vars.datediff = DaysDiff(ctx.vars.OfferDate, ctx.vars.SysDate )

 

Also tried javascript  syntax, this also does not work

ctx.vars.SysDt=ctx.vars.SysDate.getTime();

ctx.vars.OfferDt =ctx.vars.OfferDate.getTime(); 

ctx.vars.Time_Diff = ctx.vars.SysDt - ctx.vars.OfferDt;
ctx.vars.Date_Diff = ctx.vars.Time_Diff/(1000 * 3600 * 24);