How do I change the Date format in Compass?

juni 20, 2018

Steps: 

1. Modify the button which will contain the date.

1.a. This can be done by selecting the 'hamburger' button in the top right corner
1.b. Select modify
1.c  Choose the button which contains the date 
2. Click into the Actions text box 
3. In the top right of the Script Editor select the drop down menu that currently shows "System Event: Selected(thisObject)" 
4. Select the option "System Event: PageOpen(thisObject)" 
5. Add the action "SetText(screenObject, text) You can find this using the search function on the left side of the page. 
6. Select Cancel on the Screen Object picker 
7. Press and hold on "screenObject" until the "Enter expression for:" editor opens 
8. Type in the following: thisObject 
9. Select the green checkmark 
10. Press and hold on "text" until the "Enter expression for:" editor opens 
11. Type in the following, noting the space between "{:code='DateTimeString(Now(), and ~"dd/MM/yy~")'}" 

"{:code='DateTimeString(Now(), ~"dd/MM/yy~")'}" 


12. Verify the exact text above is type in correctly before selecting the green checkmark, if a mistake was made after the fact you 
can fix it but you will be required to type in all the text again as it is cleared out when you try to edit 
13. If the text looks good select the green checkmark 
14. Select Done 
15. Select the green check mark to exit Modify button 
16. Close the page and reopen it to verify the correct format is shown on the button 
User-added image


In some pagesets such as the 15 cell pageset, there may be an action on the page that is overriding the action on the button. Modify the background of the page which contains the date button. Select Actions and you should see a 'SetText' action. Delete this and test again.