title: excel vba - How to get the Day Name of Date?
body: <p>I have a small code that gets the Day Name of the Dates listed in Excel. But the problem is, it's not getting the right Day Name(e.g. Tuesday). </p>
  
  <p>For Example:</p>
  
  <pre><code>sDayName = Format(Day(11/1/2016), "dddd")
  </code></pre>
  
  <p>Then the output produces an incorrect Day Name which is:</p>
  
  <pre><code>sDayName = "Sunday"
  </code></pre>
  
  <p>when it's supposed to be "Tuesday".
  Thanks for the help guys.</p>