Avatar

Level 4

@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);

Krishnanunni_1-1642647602881.png

If you are getting error in JS activity, that could be due to error in other lines of code. Could you please try just these 3 lines of code in a separate JS activity and see if it works?