计算30-60-90天的报告以及到期日期-6个月

时间:2019-04-12 15:39:54

标签: sql sap

我正在尝试基于日期字段(使用t-sql)计算30-60-90天的老化报告

这是逻辑…… 我有一个有效日期为6/10/2019的商品 我需要计算该日期-6个月,然后取该值并计算它是否属于30、60或90天

这是我当前拥有的代码:

<head>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <style>
    tr.collapse.in {
      display: table-row;
    }
  </style>
</head>

<body>

  <div class="container">
    <table class="table table-bordered">
      <thead>
        <tr>
          <th scope="col">title1</th>
          <th scope="col">title2</th>
          <th scope="col">title3</th>
        </tr>
      </thead>
      <tbody>

        <tr data-toggle="collapse" data-target=".store-id" class="clickable">
          <td>hi there</td>
          <td>hi there</td>
          <td>hi there</td>
        </tr>
        <tr class="collapse store-id">
          <td colspan="3">
            <table class="table">
              <thead>
                <tr>
                  <th scope="col">#</th>
                  <th scope="col">First</th>
                  <th scope="col">Last</th>
                  <th scope="col">Handle</th>
                  <th scope="col">Handle</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>Mark</td>
                  <td>Otto</td>
                  <td>@mdo</td>
                  <td>@mdo</td>
                  <td>@mdo</td>
                </tr>
                <tr>
                  <td>Jacob</td>
                  <td>Thornton</td>
                  <td>@fat</td>
                  <td>@fat</td>
                  <td>@fat</td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>

0 个答案:

没有答案