title: Inserting timestamp into Cassandra
body: <p>I have a table created as follows:</p>
  
  <pre><code>CREATE TABLE my_table (
    date text,
    id text,
    time timestamp,
    value text,
    PRIMARY KEY (id));
  
  CREATE INDEX recordings_date_ci ON recordings (date);
  </code></pre>
  
  <p>I'm able to simply add a new row to the table using the following Node code:</p>
  
  <pre><code>const cassandra = require('cassandra-driver');
  const client = new cassandra.Client({ contactPoints: ['localhost'], keyspace: 'my_keyspace'});
  
  const query = 'INSERT INTO my_table (date, id, time, url) VALUES (?, ?, ?, ?)';
  client.execute(query, ['20160901', '0000000000', '2016-09-01 00:00:00+0000', 'random url'], function(err, result) {
    if (err){
      console.log(err);
    }
    console.log('Insert row ended:' + result);
  });
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <blockquote>
    <p>'Error: Expected 8 or 0 byte long for date (24)</p>
  </blockquote>
  
  <p>When I change the timestamp to epoc time:</p>
  
  <pre><code>client.execute(query, ['20160901', '0000000000', 1472688000, 'random url']
  </code></pre>
  
  <p>I get:
  d</p>
  
  <blockquote>
    <p>OverflowError: normalized days too large to fit in a C int</p>
  </blockquote>
  
  <p>I'm able to insert new rows via cqlsh so I'm probably missing something with the node.js driver.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>