Expand my Community achievements bar.

Datestamp

Avatar

Level 1

I was wondering how do I script datestamp in a datefield.

The users want the date to come up everytime they call up a form.  it needs to be in this format

00/00/00 with the time.  How would I do that??

5 Replies

Avatar

Level 10

Try this code in the FormCalc. To test it, put inside the click event of a button..

$host.messageBox(Concat(Num2Date(Date()

,"YYYY/MM/DD")," ", Num2Time(Time(), "HH/MM/SS")));

Change the formst based on your requirement.

Thanks

Srini

Avatar

Level 1

I tried that but I just kept getting a javascript error message.  I used the object then value then put a calculated read Only then Value then Runtime Property dropdown then I choose Current Date/Time.  that worked but when i try to format the data to 00/00/00 it doesnt work.  and I went to patterns then display and tried there but didnt work.

Avatar

Level 10

My code will work only in FormCalc. And I asked you put it in a Click event of the button.

Thanks

Srini

Avatar

Level 1

I did what you said and this is message I got

JavaError.jpg

Avatar

Level 10

Here is a sample form for you..Hope this helps..

https://acrobat.com/#d=NuX6MjDjEEnH-vtWf9jvTQ

If not, then send me the form to LiveCycle9@gmail.com so I can have a look at it.

While sending please mention which field is giving the issue..

Thanks

Srini