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

Jaspersoft Studio - Expression Editor - yesterday date


luca.frisetti

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Thanks, but it isn't exactly what I want ... because I should write anyway code, and I can't do it directly  to the Expression Editor.  I found a way writing this expression DATE(YEAR(TODAY( )),MONTH(TODAY( )),DAY(TODAY( ))-1), but isn't there a concise way ? maybe similar to EDATE(TODAY( ),-1) that give the possibility to have the previous month.

 

 

 

Link to comment
Share on other sites

Hi Luca,
I think you can open a request for new "feature" on the tracker. We will create something similar to EDATE.
Anyhow, for now you could use DateRange stuff.

Taken this DATERANGE functions examples: 
- DATERANGE("DAY-1").getStart() will return 12/19/13 12:00 AM
- DATERANGE("DAY-1").getEnd() will return 12/19/13 11:59 PM

You could use something like this: 
DAY(DATERANGE("DAY-1").getStart())

It's the first and quickest solution I can think of.

However, please open the issue on the tracker, also referring to this discussion.

Thanks.
Best regards,
Massimo.

Link to comment
Share on other sites

I just forgot to say, that if it's something you need to use often, you can create a "User Defined" expression from the "Preferences > Jaspersoft Studio > Editors > Expression Editor > User defined expressions".

 

Then whenever you will open the Expression Editor you will be able to put it, just double clicking on the dedicated entry in the node "User Defined Expressions".

 

Massimo.

Link to comment
Share on other sites

  • 8 months later...

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...