0

How to get Year from Timestamp in java

Timestamp t = new Timestamp ();

27th Nov 2017, 6:18 PM
Ritesh
2 Answers
+ 1
Thanks, but it is deprecated I need add 1900 with reault. It is not useful.
28th Nov 2017, 2:54 AM
Ritesh
- 1
You might get it with: t.getYear() Timestamp according to documentation is a subclass of Date, which is depreciated so hard to tell if it will work or not.
27th Nov 2017, 8:53 PM
John Wells
John Wells - avatar