on 12-23-2008 1:52 PM
Hi,
can anybody tell how to set current date in an input field by using java.sql.Date.
I am binding this input field to a value attibute of type 'date' so that the user can edit the date also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use the following to set 10 days before the current date??
Date date = new Date(Calendar.getInstance().getTimeInMillis());
Calendar calD = Calendar.getInstance();
calD.setTime(date);
calD.add(Calendar.DATE,-10);
date.setTime(calD.getTimeInMillis());
now "date" will holds the required Date .
Regards,
ramesh
Edited by: Ramesh Babu V on Dec 23, 2008 7:54 PM
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.