Page 1 of 1

System Time keeps changing

Posted: March 21st, 2023, 9:50 pm
by sham
Hi Family,
How do I design a system time logic to automatically pick the system time one regardless of whether you go back and forth in Cspro in the interview process?

I used this logic command below;
PROC START_TTIME
preproc
if demode() = add then
$ = sysTime("HHMM");

endif;

But what I realized is that, if you start an interview(say 8:20AM) half way or cover some time (say 8:50AM) and the respondent remembers that you needed to go back at the beginning (before the START_TTIME variable) to make some changes. so after making the changes, if you moved forward, the start time changes again to pick the current time(8:50). This apply to end time as well.

I need your help.
Thank you.

Amidu.

Re: System Time keeps changing

Posted: March 22nd, 2023, 7:02 am
by Gregory Martin
You can check if the value has been filled and only set it if it is blank (notappl):
PROC START_TIME

preproc

if visualvalue
(START_TIME) = notappl then
   
START_TIME = systime("HHMM");
endif;

Re: System Time keeps changing

Posted: March 22nd, 2023, 7:17 am
by sham
Hi Gregory Martin,

I am soo grateful for the support.
It is working so well.

Thank you.