Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Date and Time

Avatar

Level 9

I want to have the current date and time entered into a field when the form user clicks a custom e-mail button so I know when the form was e-mailed. Is there a scipt that I can add to the click event of the custom button, that will enter the current time and date when the button is clicked?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

this can be done with FormCalc.

Concat(Num2Date(date(), "EEE D/M/YYYY "), Num2Time(time(), "H:MM A"))

There are a couple of manuals for Designer available.

You should use the Scripting Basics and Reference and also the FormCalc User Reference.

http://help.adobe.com/en_US/livecycle/10.0/documentation.html#task=4&module=2

View solution in original post

4 Replies

Avatar

Level 10

There a several ways to get the current date&time.

One would be xfa.host.currentDateTime() which returns a date time string int the ISO 8601-Format JJJJMMTTHHMMSS.

Avatar

Level 9

Thanks for your reply radzmar. Is there one that would display the day first like,

Tues 2/19/2013 2:21PM

Is there a reference manual for these?

Thanks again!

-Don

Avatar

Correct answer by
Level 10

Hi,

this can be done with FormCalc.

Concat(Num2Date(date(), "EEE D/M/YYYY "), Num2Time(time(), "H:MM A"))

There are a couple of manuals for Designer available.

You should use the Scripting Basics and Reference and also the FormCalc User Reference.

http://help.adobe.com/en_US/livecycle/10.0/documentation.html#task=4&module=2

Avatar

Level 9

That's perfect! Thanks for your help!

-Don