How to avoid util.printd("mm/dd/yyyy",new Date())

util.printd("mm/dd/yyyy",new Date()) doe not work in Surface PDF Viewer. What would be work around it? In another words how to compose string from Date() elements without util.printd(......)

Jake Sikic

1 Answer

You can try using the built-in Date methods, like this:

var now = new Date();
var nowString = (now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear();


Visit my custom-made PDF scripts website:
Contact me personally:

Gilad D (try67)   

Please specify a reason: