Skip to content

Instantly share code, notes, and snippets.

@haizhe-cto
haizhe-cto / DateFormat in java
Created January 4, 2012 15:04
DateFormat in java
public static void main(String[] args) throws IOException, ParseException {
String strDate = "2011-01-12 07:50:00";
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = formatter.parse(strDate);
System.out.println("Date="+date);
}
@haizhe-cto
haizhe-cto / md5.java
Created January 4, 2012 15:03
md5 in java
DigestUtils.md5Hex( Url )
//http://commons.apache.org/codec/api-release/org/apache/commons/codec/digest/DigestUtils.html