Hi everyone,
I am working on a transplant trial comparing different methods of preservations.
I need to calculate the duration of some procedures, like total duration of operation or total preservation time, and I am using datetime variables (like start of procedure and end of procedure) that are type=double and format=%tcDDmonCCYY_HH:MM.
I have already done it for total duration of operation and it worked fine; I know the time elapsed is given in millisecond so, as I wanted it in minutes, I have divided it by 60000 (1000*60). I checked the results manually and they were correct.
I have tried to do the same for total preservation time using the same formula above but different variables. The command work but the values resulting are way too high, even after dividing them by 60000. I checked the type and format of the variables used in the formula and everything looks fine so I do not really know why this time is not calculating correctly.
The only difference with the formula above is that some observations have missing values for one of the datetime variable as that depends on which treatment arm they are. But I also repeated the formula using the "if" options i.e. limiting the formula to work only on the observations with non.missing value for that datetime variable.
Does anyone know what this wrong calculation could be due to?
Many thanks,
Virginia
I am working on a transplant trial comparing different methods of preservations.
I need to calculate the duration of some procedures, like total duration of operation or total preservation time, and I am using datetime variables (like start of procedure and end of procedure) that are type=double and format=%tcDDmonCCYY_HH:MM.
I have already done it for total duration of operation and it worked fine; I know the time elapsed is given in millisecond so, as I wanted it in minutes, I have divided it by 60000 (1000*60). I checked the results manually and they were correct.
I have tried to do the same for total preservation time using the same formula above but different variables. The command work but the values resulting are way too high, even after dividing them by 60000. I checked the type and format of the variables used in the formula and everything looks fine so I do not really know why this time is not calculating correctly.
The only difference with the formula above is that some observations have missing values for one of the datetime variable as that depends on which treatment arm they are. But I also repeated the formula using the "if" options i.e. limiting the formula to work only on the observations with non.missing value for that datetime variable.
Does anyone know what this wrong calculation could be due to?
Many thanks,
Virginia
Comment