@@ -0,0 +1,1562 @@
+package com.samovich.programs;%0A%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0A%0A/**%0A * @author samov004%0A * @version 1.0.0%0A * @file FileName.java%0A * @date 11/16/15%0A */%0Apublic class StringToDateObject %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        // Example 1: 7-Jun-2013%0A        SimpleDateFormat formatter = new SimpleDateFormat(%22dd-MMM-yyyy%22);%0A        String dateInString = %227-Jun-2013%22;%0A%0A        // Example 2: 7-Jun-2013%0A        SimpleDateFormat formatter2 = new SimpleDateFormat(%22dd/MM/yyyy%22);%0A        String dateInString2 = %2207/06/2013%22;%0A%0A        // Example 3: 7-Jun-2013%0A        SimpleDateFormat formatter3 = new SimpleDateFormat(%22MMM dd, yyyy%22);%0A        String dateInString3 = %22Jun 7, 2013%22;%0A%0A        try %7B%0A%0A            Date date = formatter.parse(dateInString);%0A            // Print date without formatting%0A            System.out.println(date);%0A            // Print formatted date%0A            System.out.println(formatter.format(date));%0A%0A            Date date2 = formatter2.parse(dateInString2);%0A            // Print date without formatting%0A            System.out.println(date2);%0A            // Print formatted date%0A            System.out.println(formatter2.format(date2));%0A%0A            Date date3 = formatter3.parse(dateInString3);%0A            // Print date without formatting%0A            System.out.println(date3);%0A            // Print formatted date%0A            System.out.println(formatter3.format(date3));%0A%0A        %7D catch (ParseException e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A    %7D%0A%7D%0A

Add StringToDateObject example