Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateParseExample1 { public static void main(String[] args) { Date d=new Date(); String s="1997/3/10"; System.out.println("Milliseconds from date string 's' is : "+d.parse(s)); } }
Output