Add day to date in expression editor

0

Hello,

I am using Jaspersoft Studio 6.12.2. I have a variable of class java.sql.date. In the expression editor for that  variable, I need to add one day to the current date. I find a lot of information in posts but none of it works! Can someone please help with the proper  syntax? Please don't refer me to a link because I've probably already been there. 

Thank you in advance for your help!

Dawn

DawnW's picture
12
Joined: Nov 6 2019 - 10:51am
Last seen: 3 days 21 hours ago

3 Answers:

0

Here is a link to the patterns supported by the java.text.SimpleDateFormat

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

jgust's picture
196
Joined: Jun 10 2010 - 6:39am
Last seen: 13 hours 13 min ago
0

Hi Dawn,

Did you find a way to resolve this issue? I am also trying to do something similar...so please let me know what you did to add a day to your date.

Thanks

Lavanya

6lavanya's picture
Joined: Mar 2 2015 - 1:32am
Last seen: 1 week 3 days ago
0

DATEFORMAT(NOW( ),"MM/dd/yyyy").setday(DATEFORMAT(  org.apache.commons.lang3.time.DateUtils.addDays(new java.util.Date(),1)   ,"MM/dd/yyyy”))

 

This -> org.apache.commons.lang3.time.DateUtils.addDays(new java.util.Date(),1)    adds one day to the current date (equivalent of NOW()) using one of our imported libraries.

DawnW's picture
12
Joined: Nov 6 2019 - 10:51am
Last seen: 3 days 21 hours ago
Feedback