title: Date formatting - making dd/m/yyyy into dd/mm/yyyy
body: <p>I got a pretty simple question (but yet I've been stuck at it for some time now). Does anyone know how to make the date value from dd/m/yyyy into dd/mm/yyyy in a variable?</p>
  
  <pre><code>dim lastdaylastmonth as date
  
  lastdaylastmonth = DateSerial(Year(Date), Month(Date), 0)
  </code></pre>
  
  <p>So this code, as of now, would return the last day of last month, so it will be 31/5/2015. For the sake of formatting, and a MID() down along the code to pull out the month string "05", I will need to convert the date to dd/mm/yyyy or 31/05/2015. Does anyone know the simple solution for this? I've tried:</p>
  
  <pre><code>lastdaylastmonth = format(DateSerial(Year(Date), Month(Date), 0), "dd/mm/yyyy")
  </code></pre>
  
  <p>and  it still returns the same value! Any heroes out there? :D</p>