title: SQL: Find date/time of first valid record in a date range
body: <p>Schema:
  ID       , int (PK)
  datSample, datetime
  fltValue , float</p>
  
  <p>I have a table of sample data. </p>
  
  <p>Sometimes the sample values are not captured and the record's fltValue=NULL will be marked invalid.</p>
  
  <p>I need to run a report within the following date range {datRptStart,datRptEnd}</p>
  
  <p>I must extract &amp; display the first and last VALID datSample datetime within the {datRptStart, datRptEnd} range .</p>
  
  <p>I do need to display/graph both valid and invalid values in the report </p>
  
  <p>Example Data:</p>
  
  <p><a href="https://i.stack.imgur.com/NuNiN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NuNiN.png" alt="enter image description here"></a></p>