Page 1 of 1
How to capture system time in CSPro?
Posted: May 1st, 2017, 4:58 am
by Socio
How to capture system time in CSPro in HH:MM:SS format.
Thank you.
Re: How to capture system time in CSPro?
Posted: May 1st, 2017, 6:26 am
by josh
You can use the systime() function. The help page for it has an example of getting in HH:MM:SS format.
Re: How to capture system time in CSPro?
Posted: May 2nd, 2017, 12:31 am
by Socio
Hello Josh
Thanks for your reply.
I have tried
HI202 = systime();
HI202A= int(HI202A / 10000);
HI202B = int(HI202B / 100) % 100;
HI202C = HI202C % 100;
I don't know if I miss anything. Its not taking the system time automatically.
My question format and dictionary is like this.
Q HI202 : Time of interview.
I have given three subitems in dictionary for hh, mm & ss (which are given as HI202A, HI202B, HI202C).
Thank you.
Re: How to capture system time in CSPro?
Posted: May 2nd, 2017, 8:39 am
by josh
Here is an example:
http://teleyah.com/cspro/DCJune2015/07- ... urvey7.zip
Look at PROC INTERVIEW_START_TIME_HOURS
Re: How to capture system time in CSPro?
Posted: May 2nd, 2017, 9:45 am
by sah
Hello Socio,
You are absolutely missing something with this code with respect to your holding variable. it should reflect in the functions not the other way round.
HI202 = systime();
HI202A= int(HI202A / 10000);
HI202B = int(HI202B / 100) % 100;
HI202C = HI202C % 100;
It should be rather:
HI202 = systime();
HI202A= int(HI202/ 10000);
HI202B = int(HI202/ 100) % 100;
HI202C = HI202% 100;
Another way of writing it is
HI202A= int( systime()/ 10000);
HI202B = int( systime()/ 100) % 100;
HI202C = systime() % 100;
Hope this solve your problem.
Re: How to capture system time in CSPro?
Posted: May 3rd, 2017, 1:38 am
by Socio
Hello Josh and Sah
I'm glad that I knew something today. Both example and logic are helpful.
One thing @Sah the time is not capture automatically. May be problem in my system.
Thank you both once again.