Java Timestamp setTime() MethodThe setTime() method of Timestamp class sets this class's object to indicate a point in time(milliseconds) after January 1, 1970 00:00:00 GMT. SyntaxParametersHere the parameter 'time' represents the number of milliseconds. OverridesThe setTime() method of Timestamp class overrides: setTime() method in class Date Example 1Output: Timestamp : 2018-09-01 09:01:15.0 Milliseconds : 1970-01-01 06:46:07.577 Example 2Output: Timestamp : 2018-09-01 09:01:15.0 New Timestamp : 1969-10-10 18:45:43.211 Next TopicJava-timestamp-toinstant-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India