title: Check if date is between or equal to two other dates
body: <p>I'm trying to check if a date is between two other dates. The two other dates are coming from two DatePickers formatted as dd/mm/yyyy. My code below works but if my searching date is i.e. equal to the from date I get a "Not between" message. If I search for date 17/05/2013 and I set the ranges to bet from: 17/05/2013 and to: 17/05/2013 I want to get a "Between" message. Any ideas?</p>
  
  <pre><code>Dim str As String = "srt_inlbp_20130517"
  Dim sString As String
  
  sString = str.Substring(str.Length - 8)
  Dim dTableDate As Date = Date.ParseExact(str.Substring(str.Length - 8), "yyyyMMdd", Nothing)
  
  Label9.Text = dTableDate
  
  If ((dTableDate &gt;= dFromDate.Value) And (dTableDate &lt;= dToDate.Value)) Then
          MsgBox("between")
  Else
          MsgBox("not between")
  End If
  </code></pre>