[size=large]SimpleDateFormat:java.text.DateFormat子类[/size]
Date(date)转String(str):
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss EEEE").format(date);
String(str)转Date(date):
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss EEEE").parse(str);
提示:"EEEE"表示星期几
获取当前时间(毫秒)
System.currentTimeMillis()
Date(date)转String(str):
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss EEEE").format(date);
String(str)转Date(date):
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss EEEE").parse(str);
提示:"EEEE"表示星期几
获取当前时间(毫秒)
System.currentTimeMillis()