Date and and time of analysis start - analysis end
I'm trying to do a possible workaround to add date and time of analysis start date and analysis end date.
Thus far I was successful for calculating incubation time by doing the following:
- Created a calculation(Colilert T0 for incubation start time and Colilert T1 for incubation end time) by importing time module and time function to return the number of seconds since the epoch of 1 Jan 1970 , 00:00:00. and added time capture as a interim field, and wrote the formula like this : time() * [tc]
This allows to capture a value for the formula to run and return the number of seconds since the epoch. (Attachment 1)
I then created an analysis service for each of them and assigned each of them the calculation (Attachment 2)
Created calculation for "Colilert approximate incubation time" by subtracting Colilert T0(keyword=tm02t0) from Colilert t1(keyword=tm02t1) and divide by 3600 to convert the answer in seconds to hours. The formula looks like this ([tm02t1]-[tm02t0]) / 3600. Attachment 3
It works great. When entering the value 1 to time capture interim field the formula runs and returns a result in seconds since the epoch. Once incubation time end is entered the correct incubation time is calculated. Attachment
Now I want to do the same by importing the time and strftime function. strftime("%c") as calculation, and the calculation runs when tested : attachment 5
However I have a problem because the strftime cannot be manipulated by adding a interim field and multiplying by one so there is no way of making the calculation run. So I'm stuck with a calculation that works but I can't make it run when capturing data. attachment 6
Do you have any ideas?
You could probably set up a hidden AS that uses strftime only, then use its keyword in further calculations.
Is the objective to report certain Analyses' duration? But not all?
rabit hole... Yes definitely
The idea is to record, not necessarily report the duration, however not at all important for now, just convenient during audits