I have a table in SQL Server
with a column type smalldatetime
and I am using PreparedStatement
to read/write data in my tables. E.g My table is like:
| date |
+------------------------+
| 2019-11-06 09:48:00 +
| 2019-11-05 07:04:00 +
| ... +
+------------------------+
and I am reading the column date
with:
String date = rs.getString("date");
And I get an extra .0
at the end of the date:
2019-11-06 09:48:00.0
2019-11-05 07:04:00.0
Why is this happening?