Java Date parse() MethodThe parse() method of Java date class tries to interpret the string 's' as date and time representation. If this attempt is successful then it will return number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this string argument. This method is deprecated as of JDK version 1.1 and replaced by DateFormat.parse(String s) Syntax:Parameterss - a string to be parsed as a date ReturnThe parse() method returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this string argument. Example 1Test it NowOutput: Milliseconds from date string 's' is : 857932200000
Next TopicJava Util Date
|