I am having a field like this in my database table Jan 1 1900 10:22PM
. I am getting it out like this result.setEndingDate(rs.getDate("end_tm"));
. when i do an sysout the output is displayed in the console as 1900-01-01
. What can i do to get Time stamp and also to conver it into 24 hour format .My output String String should be somehting like this 22:10
. how can i proceed to achieve this
Asked
Active
Viewed 67 times
0

Praveen
- 225
- 1
- 4
- 18
-
2take a look at: http://stackoverflow.com/questions/21162753/jdbc-resultset-i-need-a-getdatetime-but-there-is-only-getdate-and-gettimestamp – uylmz Dec 16 '16 at 23:03
-
Was just going through that link . Thanks – Praveen Dec 16 '16 at 23:08
-
i am getting output like this `1900-01-01 22:22:00.0` how can i get `22:22` alone ? – Praveen Dec 16 '16 at 23:19
-
1take a look at SimpleDateFormat :) – uylmz Dec 16 '16 at 23:56
-
```---Thanks mate !!---``` – Praveen Dec 17 '16 at 00:12