java 日期格式SimpleDateFormat例子
来源:互联网 发布:企业oa软件 编辑:程序博客网 时间:2024/05/17 03:01
/*
* Created on 2005-9-7
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author kun
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class DateDemo {
private static final SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
private static String dateStr;
public static void main(String args[]){
Date date=new Date();
Date datelong=new Date("January 1, 1970, 00:00:00 GMT");
dateStr=dateTimeFormat.format(date);
//System.out.println(dateStr);
//System.out.println(datelong);
//System.out.println(System.nanoTime());
//System.out.println(System.currentTimeMillis());
try{
System.out.println(new DateDemo().clone().toString());
}catch(CloneNotSupportedException r){
r.printStackTrace();
}
catch(Exception e){
e.printStackTrace();
}
}
}
- java 日期格式SimpleDateFormat例子
- java日期SimpleDateFormat格式
- Java日期转换SimpleDateFormat格式大全
- java日期格式大全 format SimpleDateFormat
- JAVA日期格式问题 SimpleDateFormat方法
- java日期格式大全 format SimpleDateFormat
- Java日期转换SimpleDateFormat格式大全
- Java日期转换SimpleDateFormat格式大全
- Java日期转换SimpleDateFormat格式大全
- Java日期转换SimpleDateFormat格式大全
- Java日期转换SimpleDateFormat时间格式
- Java日期转换SimpleDateFormat格式大全
- Java日期转换SimpleDateFormat格式大全
- SimpleDateFormat的java的日期格式
- java日期格式大全 format SimpleDateFormat
- Java日期转换SimpleDateFormat格式大全
- java日期格式大全 format SimpleDateFormat
- Java日期转换SimpleDateFormat格式大全
- 论中秋的盛世大联欢
- http://dotnet.mblogger.cn/w6f3y0/search.aspx
- 抵制日货的尴尬--数码相机篇
- 学习多线程
- eclipse插件集
- java 日期格式SimpleDateFormat例子
- 又是无聊的一天~
- 红客联盟公告.
- 2005年9月9日,周五
- 冷笑华集【呵呵】
- 苏州、上海校友聚会(2005年9月10日,周六)
- Javen-Studio咖啡小屋工作室
- 考过二级C的进来下
- 如何更新Pocket PC Phone Edition的OS