Categories
Something off in SQL expression for criteria

Summary
Trying to capture last month's data
Content
The report functions with the expressions below; however, It doesn't seem to actually capture the last day of the previous month. I run the data for May and know there are results for 5/31 but only captures up to 5/29. What is wrong with the expressions. The Beginning of Previous Month expression seems to capture from 5/2 and I have verified that is correct.
Beginning of Previous Month
TIMESTAMPADD(SQL_TSI_MONTH, -1, TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
End of Previous Month
TIMESTAMPADD(SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
Thank you in advance for any assistance!
Cassie Kurth
Comments
-
Hi Cassie,
Using the syntax you have above I'm not seeing any issues running this on an internal env. I get 5/31/2016 for the End of Previous Month.
Noelle
0 -
Hi Cassandra,
Did you get any solution for this TIMESTAMPADD functionality ?
Thanks,
Murali
0