title: How to manage dates in Android sqLite database when I care only about the date (which is to be unique) and not the time?
body: <p>This is my first question so bear with me and just let me know if it's not clear what I mean. I have no idea how to look for an answer. I'm pretty new to both Android and Java.</p>
  
  <p>I want to use sqLite database table for storing values and I want to have only one, unique date and "value" combination per day. Idea is to make kind of a log where anything can be logged only once per day (except updating or editing afterwards). I decided to use Unix timestamps and INTEGER as data type for date. Table looks something like this:</p>
  
  <pre><code>("Unix_timestamp","value","state")
  </code></pre>
  
  <p>Right now I am inserting <code>System.currentTimeMillis()/1000L</code> but then there might be thousands of dates per one day with the same "value" not to mention problem with selecting.</p>
  
  <p>What is the most convenient way of inserting and selecting dates? Should it be done via sqLite functions or some Android or java methods?</p>
  
  <p>EDIT: I almost forgot to add: I have an idea of inserting dates in Unix time but in a way they are eg. always the begining of the day (midnight) but I couldn't figure out how to do this, which methods to use. I feel like sqLite is really bad when it comes to dates.</p>