title: How to compare dates in MySQL?
body: <p>I have table (named <code>tasks</code>) with column <code>created_at</code> that, basically, contains UNIX time-stamp.</p>
  
  <p>I need to select only those results that are created in specified time-interval.</p>
  
  <p>Intervals are <code>today</code>, <code>tomorrow</code>, <code>this week</code> and <code>this month</code>.</p>
  
  <p>I think that if I convert time-stamp to <code>YYYY-MM-DD HH:MM:SS</code> format, MySQL can handle it.</p>
  
  <p>Also, I think that I need to use <code>BETWEEN</code> there as well.</p>
  
  <p>So, I pass time-stamp to query and compare (check?) that it's in the specified interval with time-stamp that is stored in the database. To convert, I need to use <code>FROM_UNIXTIME</code>, right?</p>
  
  <p>How to specify those intervals? Thanks in an advice!</p>