7 Replies Latest reply on Jan 29, 2018 1:12 PM by dc4networks

    SQL for last 30 days - date calculation

      Hi all,

      I am creating a bespoke report based on the built-in Orion "last 30 days" report. In Report Writer the SQL is something like this:

      SELECT .....
      FROM .....
      WHERE
      ( DateTime BETWEEN 87893 AND 87922 )

      As the report is a 'rolling' 30 days, how does report writer calculate the 5-digit values above? When I look at the SQL in the writer app they have already been worked out...

      Thanks ,

      Stephen