title: MySQL DAYOFWEEK() in reverse?
body: <p>I'm looking for a way in MySQL to convert an integer (0-6) into a day of the week, something like: </p>
  
  <pre><code>EXAMPLE_FUNCTION(3) = Wednesday.
  </code></pre>
  
  <p>The <a href="https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayofweek" rel="nofollow"><code>DAYOFWEEK(date)</code></a> function takes a date and gives you a number 0-6 which corresponds to the day of the week (0 = Sunday, 6 = Saturday), so I'm kind of looking for the reverse of this. </p>