title: Mysql - Unique constraint on CAST(TIMESTAMP as DATE)
body: <p>I have a <code>TIMESTAMP myDate</code> field in my MYSQL Table.</p>
  
  <p>Is there a way I can define a unique string <code>stringForTheDay</code> for every <em>day</em> in <code>myDate</code>?</p>
  
  <p>Something like:</p>
  
  <pre><code>UNIQUE(stringForTheDay, day_in_mydate)
  </code></pre>
  
  <p>In short, these 2 rows must not be allowed:</p>
  
  <pre><code>2012-11-29 13:35:53      samestring
  2012-11-29 20:39:09      samestring
  </code></pre>