title: Adding seconds to time variable
body: <pre><code>*data final; 
     set final;
   duration = redate-ondate;
   dudays = floor(duration/86400);
   duhrs = floor((duration-(dudays*86400))/3600);
   dumins = floor((duration-(dudays*86400+duhrs*3600))/60);
  
  ****************Set up new variable duration**************;
  attrib dur length=$11.;
  if ae_term ne 'None' and dudays ne . then 
    dur = left(put(dudays,z2.))||':'||left(put(duhrs,z2.))||':'||left(put(dumins,z2.));
  else dur = '';
  run;*
  </code></pre>
  <p>I have this code but need to calculate seconds and concatenate to dur as I have an adverse event that is less than a minute so won't display. What's the most efficient way to do this?</p>