Expand my Community achievements bar.

Time Formats


Former Community Member
I would like to have the caption of a checkbox change from the text to the time that the box was checked.(Basically Time Stamp the Click Event) I've been able to get it to change to the milliseconds but have not been able to format this number to readable time.

The code that I'm using is this:

CheckBox1.caption.value.#text = Time()

I have tried to use the Num2Time function but all I get are error messages. I would appreciate any help that can be given.

2 Replies


Former Community Member
In the check box's Click event, you can use the following script (make sure the language is set to

var oNow = new Date;

//this.caption.value.resolveNode("#text").value = oNow.toTimeString();

this.caption.value.resolveNode("#text").value = (oNow.getMonth() + 1) + "/" + oNow.getDate() + "/" + oNow.getFullYear() + " @ " + oNow.getHours() + ":" + oNow.getMinutes() + ":" + oNow.getSeconds();

The first method is commented-out in this example. Try it the way it is and then try commenting the third line and un-commenting the second one to see the difference.


Adobe Systems


Level 1

Is there a way to adapt that script to make a check box's background color change when the box is checked, i.e, white before being checked and grey after checked?