Java SQL Date setTime() MethodThe setTime() method of Java Date class sets an existing date object by using the given millisecond time value. The driver will set the time components to the time in the default time zone if the given milliseconds value contains time information. This method overrides the setTime method in class Date. SyntaxParametersdate - It is the milliseconds since January 1, 1970, 00:00:00 GMT not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT. ReturnsNA Example 1Test it NowOutput: Current time = 1212121212
Next TopicJava SQL Date
|