hejingsong
24th January 2005, 07:36
Hello all:
I want to always dislay current system date and time in session.but i do not know how to do !Can anybody help me!

malutz
24th January 2005, 08:58
Does the time need to refresh every second, or is it enough if you display the time when the session was opened?

In case it is the second:
- Create a Formfield (diplay).
- set value in init.field

hejingsong
24th January 2005, 11:13
hi Marcel ,
But init.field can display only,how to display dinamic time?

NPRao
24th January 2005, 23:00
Here is a sample code, I didnt use a display field, but used the status bar for displaying the current date/time. I update the date/time information every 3 seconds in this example.

Be aware that this status bar might not be displayed in a Webtop Interface.


long timer

before.program:
timer = set.timer(3000)

choice.interrupt:
on.choice:
mess("zmadms0053", 0, sprintf$(" %u(%02m/%02d/%04Y)-%U(%02h%x%02m%x%02s:%a) ", utc.num(), utc.num()))


zmadms0053 is a message defined as - %1$s

hejingsong
25th January 2005, 04:21
Hi NPRao
My sessiones with current data/time work fine using your method!thanks a lot !

gerardd
23rd April 2013, 14:58
long timer

before.program:
timer = set.timer(3000)



great , thanks works finaly, I forgot to set the timer