Survey duration error

Discussions about CSEntry
Post Reply
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Survey duration error

Post by CMH »

Hi
Using timestamp function given at https://www.csprousers.org/help/CSPro/t ... ction.html i tried to calculate survey time duration, but its not working. CAPI application is attached, appriciated if someone please review and let me know what is the issue and how can be solved. thanks
Attachments
Test.rar
(36.74 KiB) Downloaded 217 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Survey duration error

Post by Gregory Martin »

Your calculation is done PROC UPLOAD_PICTURES_ID, so it's only recording the time to fill the ID field. You want to move it into the level procedure so that it is executed prior to data entry, and then after the case is entered.
PROC UPLOAD_PICTURES_LEVEL

preproc

   
surveyStartTime = timestamp();

postproc

   
SURVEY_DURATION = timestamp() - surveyStartTime;
Note that this is not 100% correct, as the duration value would be overridden if the case were modified (after an initial entry), but if that is not a concern, this should be fine.
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Re: Survey duration error

Post by CMH »

Thank you very much
Post Reply