How do I calculate Prior Month Beginning Date in AdHoc?

0

If Today is 10/7/2019 how do I calculate the 1st day of the prior month (9/1/2019) in the AdHoc editor?

laura.mays's picture
Joined: Nov 8 2016 - 1:51pm
Last seen: 1 week 1 day ago

First Day of last month:

new SimpleDateFormat("yyyy-MM-dd").format(java.util.Date.parse((MONTH(NOW( )) -1 ) + "/1/" + YEAR(NOW()))    )

danoldenkamp@gmail.com - 1 week 1 day ago

1 Answer:

0

Take a look here... there I described how to set a default value for the last day in last month (something similiar to your question) using the shipped with Apache Library for the DateUtils.

https://community.jaspersoft.com/questions/1122406/expression-editor-last-day-last-month

hth + regards

C-Box

C-Box's picture
1945
Joined: Jul 19 2006 - 5:58pm
Last seen: 5 days 8 hours ago
Feedback
randomness