I'm creating a form for my staff to fill in. When they open the form up to start there entries, I want the time to be automatically generated and placed on the form.
I do not want the time to adjust every time they make edits, only want it inputted once when they open the form initially. I think I figured out how to do this with the date, but the time I cannot figure out.
Step-by-step instructions would be great!!!!
thanks, and I am brand new to Acrobat X pro
The following script shows how to get the same display using both methods. To get the spelled out month requires additional code for the lookup in JavaScript.
var oDate = new Date();
// using util.printd;
var sDateTime = util.printd("m/d/yyyy HH:MM:ss", oDate);
console.println(sDateTime);
// using JavaScript methods
var nFullYear = oDate.getFullYear();
var nMonth = oDate.getMonth() + 1;
var nDate = oDate.getDate();
var nHours = oDate.getHours();
var nMinutes = oDate.getMinutes();
var nSeconds = oDate.getSeconds();
sDateTime = nMonth + "/" + nDate + "/" + nFullYear + " " + nHours + ":" + nMinutes + ":" + nSeconds;
console.println(sDateTime);
George Kaiser