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

Can't get auto-populated current date & time field to show in correct way

Avatar

Avatar
Ignite 3
Level 3
lostfrogg
Level 3

Likes

8 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Ignite 3
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Ignite 3
Level 3
lostfrogg
Level 3

Likes

8 likes

Total Posts

66 posts

Correct Reply

0 solutions
Top badges earned
Ignite 3
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile
lostfrogg
Level 3

23-08-2020

I've added a "Date/Time Field" to my form. In the value tab, type is "calculated - read only". Runtime property is "Current Date/Time". 

If I go to "patterns" and select a particular type under both "display" and "data" (e.g. April 01, 2007 3:30:47 PM) and click OK, then go to the "preview PDF tab", the data is shown as "2020-08-23 10:08:17". Why isn't it showing the date & time in the way I chose?

Also, I want it to show the date & time when the user opens the form to fill it in. I don't want it to update this when I receive the form and open it to view it - is this possible?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Level 2
Rakhi_Sukhadeve
Level 2

Likes

10 likes

Total Posts

13 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Level 2
Rakhi_Sukhadeve
Level 2

Likes

10 likes

Total Posts

13 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rakhi_Sukhadeve
Level 2

03-09-2020

@lostfrogg  If you set Runtime property as "Current Date/Time", it calls the below FormCalc script in layout:ready event of the DatatimeField. If you want to change the display pattern, you can modify it here.

 

$.rawValue = Concat(Num2Date(Date(), "YYYY-MM-DD"), " ", Num2Time(Time(), "HH:MM:SS"))

 

Also, if you want to show the date & time when the user opens the form to fill it, in that case, you can write a simple Javascript for fetching the current datetime and use it in the form initialize event.

 

I hope this is helpful.

Answers (0)