Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

By: Ruben Misrahi - rnmisrahi


2003-05-19 11:30

Is there a way to write yesterday's date in a report?

I mean as a parameter. As far as I know, new Date() will print today's date.


Would it be the same using TimeStamp?







By: Gregory A. Swarthout - gswarthout

RE: Yesterday

2003-05-19 11:55

How about new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000)





By: Albert L. - looks

RE: Yesterday

2003-05-19 11:57

try this :


java.util.Date yesterday =

new java.util.Date( System.currentTimeMillis() -

86400000 );






By: Ruben Misrahi - rnmisrahi

RE: Yesterday

2003-05-20 07:43

Thanks much!

A further need was to get the day before a certain Timestamp stored in a field. Using your ideas I found the solution to that too:

new java.sql.Timestamp($F{DTE}.getTime()-86400000)


Thanks again!

Link to comment
Share on other sites

  • Replies 0
  • 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...