Skip to main content

This is probably a really simple thing to do, but i'm trying to add a Time and Date Stamp to a View/Form.

 

Any idea how I can automate the insertion of the current date and the current time (seperately) onto a form as  Read only?

 

I had a look at the data label control, but that didn't do anything. But i was wondering if there was any other way to do this.

 

Thanks in advance

 

 

Hi Sharpharp,


 


This can be done with Data Label in a Form or a View. First create the Form/View and add the Data label, then click on the Data label and click  the conditional stylings tab in the Properties box in the bottom right corner. Once Conditional stylings box has loaded, go to the Edit the Default Style and click on Date and Time.


 


Here you set Language and Region and the type of format you want the Date and Time to be displayed.


Next go to the Rules tab and add a new Rule, select the "When the View/Form executes a method" Event and select "Initialize". Next click on the Actions Tab and add then select the "Set a control's properties" action. Then select the Data Label as the control and click Configure.


 


Next open the System Value folder in the Context Browser and open the Current Date and then drag the "Current Date and Time" value in to "Text" dialog box. Then run the View/Form and everytime the View/Form initializes the current date and time will be displayed in the data label.


 


HTH


 


Regards,


 


Yannick


 


 


 


Excellent, worked exactly as intended, kudos to you Yannick!!!


Hi all,

 

Sorry to bring this one up, but i've noticed that the Time being displayed in the Datafield (when the form is run) is appeared an hour behind.

 

I have ensured that the Style is set to the correct Language/Region and it even shows the correct time in the Style Builder Preview.

 

However when running the form, the time being displayed on the form is shown an hour behind. I've checked the Server and the time is correct on there. Any ideas why this is happening?


Is it possible that this is caused by application of Daylight Saving Time which caused time zones to vary?


This is very intermittant. Sometimes it's displayed correctly in the PDF and other times it displays the time in Zulu format (1 hour behind).

 

Can anyone suggest any fixes? Why is this so flakey?


Reply