import java.util.*;
import java.text.*;
public class DateToString {
 public static void main(String[] args) {
 try {
 DateFormat formatter ; 
 Date date ;  
  formatter = new SimpleDateFormat("dd-MMM-yy");
  date = (Date)formatter.parse("11-June-07");  
  String s = formatter.format(date);
  System.out.println("Today is " + s);
  } catch (ParseException e)
  {System.out.println("Exception :"+e);  }  
 
 }
} 
Written on Eylül 29th, 2011 , java Tags: ,

mikailoral is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

mikailoral

Bir baÅŸka WordPress sitesi