org.apache.commons.lang.time.DateFormatUtils?????.
import java.util.Date;
import org.apache.commons.lang.time.DateFormatUtils;
public class Test2 {
public static void main(String[] args) {
try{
Date date = new Date();
System.out.println(DateFormatUtils.format(date, "yyyy/MM/dd HH:mm:ss"));
System.out.println(DateFormatUtils.format(date, "yyyy/MM/dd"));
System.out.println(DateFormatUtils.format(date, "yyyy/MM"));
}catch ( Exception e ){
}
}
}
???????
???????????????URL:
http://www.sanryu.net/cgi-bin/mt/mt-tb.cgi/69