title: How to retain values in a SAS dataset with datetime?
body: <p>I need help retaining values in a SAS dataset and completing the column datetime (to the level of seconds) when not existing.</p>
  <p>My dataset looks like:</p>
  <pre><code>data HAVE;  
  input type$ DATE:datetime18. value;
  format date datetime18.;
  cards;
  
  A 19JUN01:21:06:55 534
  A 19JUN01:21:06:58 590
  A 19JUN01:21:07:02 600
  A 19JUN01:21:07:04 602
  B 18JUN01:22:06:58 105
  B 18JUN01:22:07:03 110
  ;
  run; 
  </code></pre>
  <p>I need to fill the missing datetime and repeat the value when needed.</p>
  <p>My result dataset should be:</p>
  <pre><code>data WANT;  
  input type$ DATE:datetime18. value;
  format date datetime18.;
      cards;
  
  A 19JUN01:21:06:55 534
  A 19JUN01:21:06:56 534
  A 19JUN01:21:06:57 534
  A 19JUN01:21:06:58 590
  A 19JUN01:21:06:59 590
  A 19JUN01:21:07:00 590
  A 19JUN01:21:07:01 590
  A 19JUN01:21:07:02 600
  A 19JUN01:21:07:03 600
  A 19JUN01:21:07:04 602
  B 18JUN01:22:06:58 105
  B 18JUN01:22:06:59 105
  B 18JUN01:22:07:00 105
  B 18JUN01:22:07:01 105
  B 18JUN01:22:07:02 105
  B 18JUN01:22:07:03 110
      ;
  run; 
  </code></pre>
  <p>Thanks for your suggestions.
  Regards</p>