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() );
Solved! Go to Solution.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
The pattern you want to use is: EEEE, MM/DD/YYYY, h:MM A
I was not able to reply yesterday - that option was not displayed.
Unfortunitly, EEEE, MM/DD/YYYY, h:MM A does not work in the textfield, and I need to have it in a textfield.
Thanks for your reply.
~Don
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Did not realize it was FormCalc - works great!
Thank you, thank you!
~Don
Views
Replies
Total Likes
Is there a way in FormCalc to shorten the day to three digets (Shorten Wednesday to "Wed")>
thanks again!
don
Views
Replies
Total Likes
Yup, just change EEEE to EEE.
Thank you - I'm new to FormCalc.
~Don
Views
Replies
Total Likes
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.pdf
Views
Replies
Total Likes
Thanks for the links and the help!
~Don
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies