Skip to content

Instantly share code, notes, and snippets.

@carlosdlf
Created November 7, 2015 15:56
Show Gist options
  • Save carlosdlf/2c0698fa909cf2e17316 to your computer and use it in GitHub Desktop.
Save carlosdlf/2c0698fa909cf2e17316 to your computer and use it in GitHub Desktop.
Util Date to Sql Date
public class MainClass {
public static void main(String[] args) {
java.util.Date utilDate = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
System.out.println("utilDate:" + utilDate);
System.out.println("sqlDate:" + sqlDate);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment