title: SqlDateTime overflow Exception
body: <p>I am trying to insert a time only value, but get the following error</p>
  
  <blockquote>
    <ul>
    <li>ex  {"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."}  System.Exception</li>
    </ul>
  </blockquote>
  
  <p>From the front end, the time is selected using the "TimeEdit" control, with the up and down arrows. The table in SQL Server has the fields set as smalldatetime. I only need to store the time. I use the following to return data to the app</p>
  
  <p>select id,CONVERT(CHAR(5),timeFrom,8)as timeFrom,CONVERT(CHAR(5),timeTo,8)as timeTo
  FROM dbo.Availability
  where id = @id
  and dayName = @weekday</p>
  
  <p>How do I pass time only to the table?</p>
  
  <p>Edit ~ Solution
  As per Euardo and Chris, my solution was to pass a datetime string instead of a time only string. I formatted my result as per <a href="http://msdn.microsoft.com/en-us/library/az4se3k1(VS.71).aspx" rel="nofollow noreferrer">Time Format</a> using "g".</p>
  
  <p>Thanks</p>