title: How to store and query a unix 10-digit epoch time into something human readable in Cassandra?
body: <p>I have a UNIX epoch time stored in a set of data I'm trying to import in the following format <em>without</em> milliseconds <code>1006,785,1502054277,8</code> (third entry). I noticed I can only store this in Cassandra as a timestamp. However, when I try to convert the time when querying it comes across as follows using this query: </p>
  
  <pre><code>select player_id, server_id, dateof(mintimeuuid(last_login)) as timestamp, sessions from servers_by_user where server_id = 440 and player_id = 217442
  
   player_id | server_id | timestamp                       | sessions
  -----------+-----------+---------------------------------+---------------
      217442 |       440 | 1970-01-18 06:38:03.382000+0000 |              1
  </code></pre>
  
  <p>That's obviously not right because that epoch time is actually <code>2017-08-06T21:17:57+00:00</code>.</p>
  
  <p>I tried to store the data as <code>timeuuid</code> but then I get this error presumably because it is not a 13-digit epoch time: <code>Failed to import 1 rows: ParseError - Failed to parse 1502054277 : badly formed hexadecimal UUID string,</code>.</p>
  
  <p>What would be the best way to store a 10-digit UNIX epoch time and to query it back into something that is human-readable?</p>