AnsweredAssumed Answered

How can I write a PI SQL commander query to get a value at the last day of a calendar month?

Question asked by dhamilton2 on May 4, 2015
Latest reply on May 4, 2015 by aseck

PI seems to have a BOM('*') time expression to signify the start of the current month.  How about the last day of the current month?

 

E.g. how can this query be changed to show values at the end of each month?

    

         SELECT *

FROM [piarchive].[piinterp2]

WHERE tag = 'sinusoid'

     AND time BETWEEN Bom('*-1y') AND '*'

     AND timestep = '1mo'

 

Thanks!

Outcomes