/*
* 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();
}
}
}