How to show users the current date and time
On the page that you would like to show the current date and time, you will need to create a printed variable. Please click on the category link at the bottom of this page for the link showing you how to do this.
In this example, we will call the printed variable displaytime and it will be shown on page1:
show page1
set page1.displaytime to printtime (currenttime, "H:m d-M-y")
Time can be printed in many different formats - for example:
show page1
set page1.displaytime to printtime (currenttime(), "'It is 'H'hrs, 'm' minutes and 's' seconds past midnight on 'E")
will display something like:
It is 14hrs, 30 minutes and 56 seconds past midnight on Tue
For a more detailed description and all the formats of time supported, see Logic_Dictionary#printtime. Please see the tutorial intervention 'Time and Date' on the LifeGuide Community Website for a demo of this function and how it can be used in other ways.