title: SQL Server procedure to display if date is a weekday or weekend
body: <p>Messing around in SQL and I am VERY new so please excuse my freshness to this. I have created a procedure that accepts a date as an input and prints original, one year later, a week later and a day later. Now I'd like to get it to tell me if those dates are weekdays or weekends in the output. I know from 'Googling' it may have something to do with <code>DATETIME</code> or <code>DATENAME</code>. Hoping for some guidance from you guys. Thanks!</p>
  
  <pre><code>CREATE PROCEDURE dates 
  AS
  BEGIN
      DECLARE @startdate SMALLDATETIME;
      DECLARE @dateafteryear VARCHAR(50);
      DECLARE @weekafter VARCHAR(50);
      DECLARE @daylater VARCHAR(50);
  
      SET @startdate = GETDATE();
      SET @dateafteryear = DATEADD(YYYY, 1, @startdate)
      SET @weekafter = DATEADD(WEEK, 1, @startdate)
      SET @daylater = DATEADD(DAY, 1, @startdate)
  
      PRINT 'Original Date ' + CAST(@startdate AS VARCHAR);
      PRINT 'A year later ' + CAST(@dateafteryear AS VARCHAR);
      PRINT 'A week later ' + CAST(@weekafter AS VARCHAR);
      PRINT 'A day later ' + CAST(@daylater AS VARCHAR);
  END
  GO
  
  EXEC dates;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Original date Jan 12 2015 4:47PM, **is a Weekday.**
  A year later Jan 12 2016 4:47PM, **is a Weekday.**
  A week later Jan 19 2015 4:47PM, **is a Weekday.**
  A day later Sep 17 2018 4:50 PM, **is a Weekday.**
  </code></pre>