title: KDB - reformatting date
body: <p>I'm formatting dates between day format YYYY.MM.DD  and Monthly YYYY.MM  and having some issues recasting data back and forth. Per Shock and Awe, I understand that the YYYY.MM format needs to be an integer however I'm having issues casting it correctly. Presently, I'm casting as a string to truncate the text and assign railing type indicator &quot;m&quot; but it returns an empty field.</p>
  <p>I also have been looking at the Library as well .qdate.q_ but there doesn't seem to be a format for this.</p>
  <p>I've read Shock and Awe here which makes complete sense <a href="https://code.kx.com/q4m3/2_Basic_Data_Types_Atoms/#254-month" rel="nofollow noreferrer">Basic Data Types – Atoms </a></p>
  <pre><code>id   seg         scen      prod SegmentStartDate iMonthCount fcast    StartDate
  -----------------------------------------------------------------------------------
  AAA       1       PLAN      XXX     2014.08.01       1           238.3821 2014.08m
  AAA       1       PLAN      XXX     2014.08.01       1           235.1754 2014.08m
  AAA       1       PLAN      XXX     2014.08.01       1           232.0119 2014.08m
  ...
  
  tblMonthly: update StartDate: `$((-3_'string SegmentStartDate),'(&quot;m&quot;)) from tblMonthly; //formats as sym 
  tblMonthly: update StartDate: &quot;I&quot;$'string StartDate from tblMonthly; //fails to recast
  </code></pre>
  <p>Thanks in advance</p>