1.SimpleDateFormat日期格式:
简单代码示例:
package others; import java.text.SimpleDateFormat; import java.util.Date; public class DateDemo1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Date d = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日EE hh:mm:ss"); String s = sdf.format(d); System.out.println(s); } }