日期格式化

import java.text.*;
import java.util.*;
public class SimpleDateFormatTest {
    public static void main(String[] args) {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        
        Date d = new Date();
        String _currentDate=sdf.format(d);
        System.out.println(_currentDate);
    }
}

 

posted @ 2013-09-03 10:03  fang_beny  阅读(106)  评论(0编辑  收藏  举报