@shri91127 ,I have executed the following code and it gave me the right result, a NovDate string with the format shared.var NovDate = new Date();
NovDate = formatDate(NovDate, "%4Y%2M%2D%2H%2N%2S");
logInfo(NovDate);If you are getting error in JS activity, that could be due to error in other lines ...