toxy Posted October 13, 2011 Share Posted October 13, 2011 Hello!Again I need some help... (iReport 4.1.1)I have a textfield in my report with two dates, today and a date some days later. My problem is the sytax for adding days to the date:"Geburtstagsliste vom " + new SimpleDateFormat( "dd.MM.yyyy" ).format( new Date() ) + " bis " + *today+2days*) ???[/code]I've found some postings about "calendar.add(...)" but my tries are all...thanks a lot! Link to comment Share on other sites More sharing options...
sanbez Posted October 13, 2011 Share Posted October 13, 2011 Try adding "manually" two days in milliseconds.For example: new SimpleDateFormat( "dd.MM.yyyy" ).format(new Date().getTime()+86400000*2)But IMHO is not good solution. But it must work.Post Edited by sanbez at 10/13/2011 17:00 Link to comment Share on other sites More sharing options...
toxy Posted October 14, 2011 Author Share Posted October 14, 2011 sanbezWrote: Try adding "manually" two days in milliseconds. For example: new SimpleDateFormat( "dd.MM.yyyy" ).format(new Date().getTime()+86400000*2) But IMHO is not good solution. But it must work. Post Edited by sanbez at 10/13/2011 17:00 /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif it works! of course not sooo elegant, but short and clear!Thank you very much! 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