title: Date Condition with Case when Holiday exclude
body: <p>I need sales from start of month i.e 1 August till 16 August so this is my Query for sales -
  Here Net_Amount Is column for sales figure,</p>
  
  <pre><code>select sum(case when Date=FORMAT(GetDate()-1, 'yyyy-MM-dd') 
                  then Net_Amount else 0
             end) as TodaysSales
  From SalesM
  </code></pre>
  
  <p>Now We have Friday Holiday , I want that if Friday comes then it should count from 1 August till 15 August i.e Thursday. I have one table Date Table there is one column Isweekend ='1' for Friday , How I can use this in my query as already I put one case
  SalesM table has Month column and Date table also has month and year column.</p>
  
  <pre><code>select case when satrndd = FORMAT(GetDate()-1, 'yyyy-MM-dd' )
              then inna when IsWeekend='1' then 
             else 0
         end as Todaystotal
  
  
  select case when satrndd = FORMAT(GetDate()-1, 'yyyy-MM-dd' )
              then inna
              when IsWeekend='1' then 
              else 0
         end as Todaystotal
  </code></pre>