How to capture system time in CSPro in HH:MM:SS format.
Thank you.
How to capture system time in CSPro?
Re: How to capture system time in CSPro?
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?
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.
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?
Here is an example: http://teleyah.com/cspro/DCJune2015/07- ... urvey7.zip
Look at PROC INTERVIEW_START_TIME_HOURS
Look at PROC INTERVIEW_START_TIME_HOURS
Re: How to capture system time in CSPro?
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.
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?
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.
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.