on ‎2007 Jun 19 2:52 AM
Hi All,
What is the difference between java.sql.date and java.util.date and which is more preferable to use .How to convert date from one form to another .
Thanks.
Request clarification before answering.
Hi Ki,
Check this thread.
To convert the date in to other format you have to use SimpleDateFormat.
Package
-
import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
Code:-
-
SimpleDateFormat smpdtFormat =new SimpleDateFormat("yyyy-MM-dd");
String vFr="";
vFr = wdContext.nodeProductDate().getElementAt(0).getAttributeValue("Validfr").toString();
prodElem.setValidFrom(new Date(smpdtFormat.parse(vFr).getTime()));
Check this threads...
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.