Jump to content
We've recently updated our Privacy Statement, available here ×

date -1 day?


q16marvin
Go to solution Solved by q16marvin,

Recommended Posts

Hello,

i wrote me class to get some dates for "Yesterday,Last Week and Last Month". Yesterday and Last Month works great, but Last Week give me in jasperserver the wrong date (-1 day). in ireport works great.

here is the code:

        if("Last Week".equals(dateChoice)){
            cal.setTime(new Date());
            cal.add(Calendar.WEEK_OF_YEAR,-1);
            cal.set(Calendar.DAY_OF_WEEK,cal.getFirstDayOfWeek());    
        }

Why is it not working in jasperserver?

i read something to set the datasource timezone to defautl, but it also stands on default ...

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...