title: How to get first day of year in KDB/Q?
body: <p>I'm looking for efficient function to get the first day of year in Q. Like <code>2017.05.10 -&gt; 2017.01.01</code> or <code>2016.08.19 -&gt; 2016.01.01</code>.</p>
  
  <p>The next snippet works, but it is not efficient</p>
  
  <pre><code>{"D"$(string `year$x),".01.01"} .z.d
  </code></pre>