title: vb.net add/remove days to date and change format
body: <pre><code>Function GetFirstDayOfMonth(ByVal dtDate As Date) As DateTime
          Dim dtFrom As Date = dtDate
          dtFrom = dtFrom.AddDays(-(dtFrom.Day - 1))
          Return dtFrom
      End Function
  </code></pre>
  
  <p>i use this function to get the first day of a month and i call it here:</p>
  
  <pre><code>detail_fromdate = GetFirstDayOfMonth(DateTime.Now.ToString("yyyy-MM-dd")).ToString("dd-MM-yyyy)
  </code></pre>
  
  <p>but its not changing the format to <code>dd-MM-yyyy</code></p>