Friday, January 30, 2015

Test sharing code with Gist



package test;
import java.sql.Timestamp;
import util.CommonUtil;
public class TestDate {
public static void main(String[] args) throws Exception{
java.util.Date utilDate = CommonUtil.df.parse("22/01/2015 11:52:00");
Timestamp ts = new Timestamp(utilDate.getTime());
System.out.println("utilDate:" + utilDate);
System.out.println("sql timestamp:" + ts);
}
}
view raw gistfile1.java hosted with ❤ by GitHub
I am using gist for sharing code here. Credits to the original blogger's post.





No comments:

Post a Comment