Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Automatically displaying date and time in a date/time field on form initialize

Avatar

Avatar
Validate 25
Level 2
donn44157260
Level 2

Likes

0 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Affirm 1
View profile

Avatar
Validate 25
Level 2
donn44157260
Level 2

Likes

0 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Affirm 1
View profile
donn44157260
Level 2

21-12-2011

Good day all;

I am trying to have the current date and time automatically be generated in a “date/time” field when the form is opened.

I went through the forum and found an entry from Srini “ xfa.host.messageBox("" + Date());” . Of course this brought up a system message box with the date and time.

I then tried “DateTimeField1.rawValue = (“”+date())… This also gave me a system message box with the date and time…

Please let me know where I am going wrong

Chomp

Replies

Avatar

Avatar
Validate 25
Level 2
donn44157260
Level 2

Likes

0 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Affirm 1
View profile

Avatar
Validate 25
Level 2
donn44157260
Level 2

Likes

0 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 25
Validate 10
Validate 1
Affirm 1
View profile
donn44157260
Level 2

21-12-2011

Found the answer... And yes... in was in the "help" section... What can I say I was making it a lot more crazy than I needed to.

You can use a date/time field to automatically show the current date by using the Runtime Property option in the Value tab of the Object palette.

When using a current date field, the date updates to reflect the system’s current date each time a user opens the form.

1.

In the Library palette, click the Standard category and drag a Date/Time Field object onto the form design.

2.

In the Object palette, click the Value tab and select Calculated - Read Only from the Type list.

3.

Select the Runtime Property option.

4.

View the form in the Preview PDF tab.