title: Creating a stored procedure in SQL Server 2014 that pulls between 2 dates
body: <p>I'm a complete novice to SQL Server. I'm trying to create a stored procedure where you can search between two dates. I'd like my EXEC to read something like </p>
  
  <pre><code>EXEC Procedure TimeSheetIndexSearch (Date, Date)
  </code></pre>
  
  <p>(In which case, you'd input the dates before running EXEC.</p>
  
  <pre><code>CREATE PROCEDURE TimesheetIndexSearch
  AS
     SELECT 
         Timesheets.Hours AS Hours, 
         Timesheets.DateWorked AS DateWorked, 
         Timesheets.Description AS Description,
         Timesheets.Id AS Id, 
         Users.Name AS UserName, 
         Projects.Name AS ProjectName
     FROM   
         Timesheets
     INNER JOIN 
         Users ON Timesheets.UserId = Users.Id
     INNER JOIN 
         Projects ON Timesheets.ProjectId = Projects.Id;
  </code></pre>
  
  <p>There's only one date column (no begindate or enddate). Do I use <code>Where</code>? Or <code>Order By</code>?  Thanks!</p>