Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

date setting in webdynpro


i have a from date and to date field

i have to set the to date as (current date) default

and the from date to (current date - 7 days) default

how do i code for this in webdynpro java.


Hi rohan,

In poojith's reply he is subtracting 72460*60 to get to 7 days old date.

For one month, replace 7 by 30 and for 1 year replace 7 by 365. dtToDate = new Date(System.currentTimeMillis()); dtTempDate = dtToDate - (72460*60);// 7 days before dtTempDate = dtToDate - (302460*60);// 1 month before dtTempDate = dtToDate - (3652460*60);// 1 year before dtFromDate = new Date(dtTempDate);

Best regards,


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question