I am trying to calculate the number of seconds that an event occurs in: I keep running into an issue where when the date changes and I am trying to calculate the number of seconds between I get an inflated number. It is clearly just subtracting it backwards. My numbers are in SAS time not numeric, which should be easy, but neither INTCK or just subtracting solves this issue. Code used to generate the last column (number of seconds) is below: proc sql;
create table test as
select TimeDate,
lagtime,
timex,
intck('second', lagtime, timex, 'continuous') as Duration /*(timex - lagtime) as Duration*/ /*This variation tried with same result*/
from specfaultl2_2
quit; I appreciate any feedback, I'm very stumped! Thank you.
... View more