title: String was not recognized as a valid DateTime
body: <p>My code is:</p>
  
  <pre><code> protected void Page_Load(object sender, EventArgs e)
      {
          string myDate = Request.QueryString["period"];
          if (!String.IsNullOrEmpty(myDate))
          {
              myDate = myDate.Replace("!", ":");
          }
          DateTime dt1 = Convert.ToDateTime(myDate);
          DateTime dt2 = DateTime.Now;
          TimeSpan variable = dt2 - dt1;
          if (variable.TotalMinutes &gt; 5)
          {
              Response.Write("Download time is expired now");
          }
          else
          {
              Response.Redirect("Default.aspx", false);
          }
  
  
  
      }
  </code></pre>
  
  <p>and I'm getting error like:</p>
  
  <blockquote>
    <p><em>String was not recognized as a valid DateTime.</em></p>
  </blockquote>