on ‎2011 Aug 19 12:58 PM
How to convert Date from string format to java.util.Calendar format in WDJ for saving in MDM tables?
Request clarification before answering.
Hi Isha,
You can use following code to convert string date to calender format.
String stringDate="23-Aug-10";
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date date = formatter.parse(stringDate);
Calendar calender = Calendar.getInstance();
calender.setTime(date);
After conveting into calender you can use DateTimeValue class to save in MDM table.
DateTimeValue mdmDate = new DateTimeValue(calendar);
I hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 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.