title: If time col is null then replace with 00:00
body: <p>I am working on a hospital database and table details are</p>
  
  <pre><code>Patient number     Dischargeto             Date           Time
  
  212              Hospital1            16/10/2018      14:00:00
  212              Hospital2            18/10/2018      10:00:00
  212              Hospital3            20/10/2018      18:00:00
  212              Home                 22/10/2018      10:00:00
  213              Hostpital1           11/11/2018      11:00:00
  213              Death                14/11/2018      18:00:00
  214              Hospital 1           28/12/2011      14:00:00
  214              Home                 05/01/2012      NULL
  
  Info:
  Final destination of the patient 
  212 is Home
  213 is Death
  214 is home
  </code></pre>
  
  <p>I want patients whose final destination is not death 
  so I wrote this query</p>
  
  <pre><code>select * 
  from 
  (select
  Patient number, DischargeTo, Date, Time,
  ROW_NUMBER() OVER(PARTITION BY Patientnumber order by Date desc, Time desc) as testcount
  
  from tablename) abc
  where   testcount = 1
  and 
  DischargeTo not like '%Death%'
  </code></pre>
  
  <p>results are not correct where time is null. I want to convert
  if time is null then it converts to 00:00:00 
   and so the sorting could be corrected.</p>
  
  <p>Thanks behorehand</p>