I need to display the current date and time in a textfield that is dynamicaly created. I do not want that time or date to change (remains the same as long as that field stays displayed and the form is saved.) I need it in the following format: Monday, 4/02/2012, 3:03 PM
I have the following javascript that works but lacks the format and some info needed listed above: (AM/PM day of the week)
this.rawValue = util.printd("mm/dd/yy - h:MM ", new Date() );
That should work but it's FormCalc date notation not JavaScript.
Though I was just playing around with it and it looks like time and date are separate in FormCalc - unless someone knows different?
I tried the following and it worked:
$ = Concat(num2date(date(), "EEEE, MM/DD/YYYY"), Space(1), num2time(time(), "h:MM A"))
Message was edited: Removed some extra brackets that weren't needed in the script.
I don't use FormCalc a lot but it's really good for dates and calculating using repeating objects.
FormCalc reference:
http://help.adobe.com/en_US/livecycle/9.0/FormCalc.pdf
Picture Clause reference:
http://partners.adobe.com/public/developer/en/xml/picture_clause_2.0.p df
North America
Europe, Middle East and Africa
Asia Pacific