09 April 2012

Get Month from Date


import java.text.*;
import java.util.*;

public class GetMonthFromDate {
public static void main(String args[]) {
 
Date date = new Date();
SimpleDateFormat f;

f = new SimpleDateFormat("MM");
System.out.println("Month " + f.format(date));
}
}

0 comments:

Post a Comment

Related Posts with Thumbnails

Popular Posts

 
;