title: How to format time-type data with mongodb and cubejs?
body: <p>I found this url about this topic:</p>
  <ul>
  <li><a href="https://cube.dev/docs/types-and-formats#dimensions-formats" rel="nofollow noreferrer">https://cube.dev/docs/types-and-formats#dimensions-formats</a></li>
  <li><a href="https://cube.dev/docs/working-with-string-time-dimensions" rel="nofollow noreferrer">https://cube.dev/docs/working-with-string-time-dimensions</a></li>
  </ul>
  <p>I didnt found the format for time-type.
  So I try to use sql: <code>PARSE_TIMESTAMP('%Y-%m-%d', date)</code></p>
  <pre><code>    createdat: {
        sql: `PARSE_TIMESTAMP('%Y-%m-%d',${CUBE}.\`createdAt\`)`,
        type: `time`
      },
  </code></pre>
  <p>it will return a error:</p>
  <pre><code>Error: Error: scalar function 'parse_timestamp' is not supported
  </code></pre>