These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need Help With Autodate

jimmyn
Registered: Nov 2 2010
Posts: 12

I am creating a form and i need the date field to automatically fill the date when the user opens the form. I also need it to reset to todays date when they hit the clear form button. That way if they post date the form manually and hit clear form to do another order, it will reset back to the current days date.
 
I need it to display in the DD/MMM/YYYY format.
 
I have been scouring the internet and this message board trying to find a calculation that would do what i need and i am having trouble finding anything. Can someone help me with this.
 
Thanks in advance for the help.
Jimmy

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Have you used the predefined 'Current Date' field from the 'Custom' fields in the form field library?

This field will update whenever the form is opened.

George Kaiser

jimmyn
Registered: Nov 2 2010
Posts: 12
Hi George,

Thanks for the fast reply! This message board is awesome!

I ended up using the following calculation and it works like i needed it to.

if (DateTimeField1.rawValue == null) then DateTimeField1.rawValue = Concat(Num2Date(Date(), "YYYY-MM-DD"))else DateTimeField1.rawValue endif

I am posting what i used in the hope that someone else who needs this type of information can find it. I was not aware of the predefined 'Current Date' field from the 'Custom' fields in the form field library. I am assuming that would have accomplished the same thing as the calculation?

Thanks again for your help!