<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: converting date from string to Calendar format in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaa-p/8112171#M2893111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use following code to convert string date to calender format.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
String stringDate="23-Aug-10";
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date date = formatter.parse(stringDate);
Calendar calender = Calendar.getInstance();
calender.setTime(date);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After conveting into calender you can use DateTimeValue class to save in MDM table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DateTimeValue mdmDate = new DateTimeValue(calendar);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2011 13:54:14 GMT</pubDate>
    <dc:creator>former_member40425</dc:creator>
    <dc:date>2011-08-23T13:54:14Z</dc:date>
    <item>
      <title>converting date from string to Calendar format</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaq-p/8112169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to convert Date from string format to java.util.Calendar format in WDJ for saving in MDM tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 11:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaq-p/8112169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-19T11:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: converting date from string to Calendar format</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaa-p/8112170#M2893110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
import java.text.DateFormat; 
import java.text.ParseException; 
import java.text.SimpleDateFormat; 
import java.util.Date; 
 
DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); 
try { 
Date today = df.parse("19/08/2011"); 
System.out.println("Today = " + df.format(today)); 
} 
catch (ParseException e) 
{ 
e.printStackTrace(); 
} 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reffer [this|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1737200"&gt;&lt;/A&gt;; and [conver String to Date|&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="8314923"&gt;&lt;/A&gt;]thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: VijaySAPEP on Aug 19, 2011 6:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 13:27:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaa-p/8112170#M2893110</guid>
      <dc:creator>vijay_kumar49</dc:creator>
      <dc:date>2011-08-19T13:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: converting date from string to Calendar format</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaa-p/8112171#M2893111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use following code to convert string date to calender format.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
String stringDate="23-Aug-10";
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date date = formatter.parse(stringDate);
Calendar calender = Calendar.getInstance();
calender.setTime(date);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After conveting into calender you can use DateTimeValue class to save in MDM table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DateTimeValue mdmDate = new DateTimeValue(calendar);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 13:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-date-from-string-to-calendar-format/qaa-p/8112171#M2893111</guid>
      <dc:creator>former_member40425</dc:creator>
      <dc:date>2011-08-23T13:54:14Z</dc:date>
    </item>
  </channel>
</rss>

