title: Comparing 2 dates to give 3 outcomes.
body: <p>I have a need for the changing of the headertext image in ASP.NET tab container to different colours. For Example if today is <code>23/04/2014</code> and the <code>ImageUrl="~/icons/vwicn114.gif"</code> of my tab ( with the <code>ID</code> "FireTraffic" ) and I need to update a record in my SQLserver in 2 days time , I need to change the ImageURL. so think of it as a TrafficLight system. here is a snippet of code to help understand: </p>
  
  <pre><code>        connection.Open()
      command = New SqlCommand("Select TOP 1 [Due Date] From FireTest Order By [Due Date] Desc", connection)
      Dim DueDate As String = command.ExecuteScalar()
  
      Dim Mycommand As New SqlCommand("Select TOP 1 [Date] From FireTest Order By [Date] Desc", connection)
      Mycommand = command.ExecuteScalar()
  
          connection.Close() 
  </code></pre>
  
  <p>So my code will be something like :</p>
  
  <pre><code>  If mycommand "is 1 day more than" DueDate then firetraffic.ImageURL=Red  
    If mycommand "is 3 days or less than" DueDate then firetraffic.ImageURL=Yellow
      End If 
     End If
  </code></pre>
  
  <p>I just don't know what I should be putting into the spaces which obviously aren't code , any guidance to an answer would be greatly appreciated.</p>