DawnW Posted June 26, 2020 Share Posted June 26, 2020 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 Link to comment Share on other sites More sharing options...
jgust Posted June 26, 2020 Share Posted June 26, 2020 Here is a link to the patterns supported by the java.text.SimpleDateFormathttps://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html Link to comment Share on other sites More sharing options...
6lavanya Posted July 1, 2020 Share Posted July 1, 2020 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.ThanksLavanya Link to comment Share on other sites More sharing options...
DawnW Posted July 1, 2020 Author Share Posted July 1, 2020 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now