Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

convert java 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);

  }

}
Comment

convert string to sql date in java

SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
Comment

PREVIOUS NEXT
Code Example
Java :: how to disable screen rotation android studio 
Java :: print up to 2 decimal in java 
Java :: java add commas to numbers 
Java :: reduce opacity of image in imageview in android 
Java :: java remove last character from string 
Java :: set fontcolor of jframe java 
Java :: take a value from keyboard java 
Java :: get epoch time in java 
Java :: how to vibrate android java 
Java :: java how to get fps 
Java :: HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to ztdev.co.za not permitted by network security policy 
Java :: java jpanel message error messages 
Java :: how to randomize an array java 
Java :: Could not find method compile() 
Java :: how to get time in dd/mm/yyyy format in java 
Java :: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade java.lang.OutOfMemoryError (no error message) 
Java :: convert object to map scala 
Java :: Which package contains the Java Collections Framework? Group of answer choices java.net 
Java :: heroku java 17 enable preview 
Java :: java double 2 decimal 
Java :: How to find a target element within a search pool using binary search? 
Java :: append to file in java 
Java :: system vs integration testing 
Java :: Youtube video thumbnail not load in android 11 or above 
Java :: android action key 
Java :: How to find the Levenshtein distance between two strings of characters using dynamic programming, in Java? 
Java :: checkindex java 
Java :: how to clear activity stack in android 
Java :: how to refresh activity without intent in android 
Java :: java how to get current time 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =