title: Update only for non-blanks in KDB
body: <p>I have a query <code>tab</code> with column <code>date</code> with format <code>yyyy.mm.dd</code>. I want to convert these dates into the format <code>yyyy-mm-dd</code> and I can do it successfully below:</p>
  <pre><code>q) tab:update date:{&quot;0&quot;^&quot;-&quot;sv'flip 4 -2 -2$'string`year`mm`dd$\:x}date from tab
  </code></pre>
  <p>However, some values in my column are blank and I will get <code>0000-00-00</code> for these values. From <a href="https://stackoverflow.com/a/57167110/5305519">this answer</a> I understand I probably can just replace them with blanks, but it does not seem to be very efficient:</p>
  <pre><code>date[; &quot;0000-00-00&quot;; &quot;&quot;]
  </code></pre>
  <p>I was wondering if someone can point me in the right direction to update the whole column only for non-blank values? I am guessing it is something along the lines of <code>[date not like &quot;&quot;]</code> but I just can't get it to work with my <code>update</code> statement as a single command. Thank you.</p>