I have a table `timestamptest` with a single column `timestamp` of type `timestamp without time zone`.

I inserted a value to this table :

`insert into timestamptest values('2015-09-08 13:11:11')`

The timestamp does not contain any millisecond value.

On selecting this data in pgAdmin, it is displayed same as above.

But when I fetch this data using jdbc connection, the value displayed is with milliseconds.

```
    Class.forName("org.postgresql.Driver");
    Connection lConnection = null;
    lConnection = DriverManager.getConnection(
       "jdbc:postgresql://localhost:5432/postgres","postgres", "Password@123");
    String lQuery = "select * from timestamptest";
    Statement lStatement = lConnection.createStatement();
    ResultSet lResultSet = lStatement.executeQuery(lQuery);
    while(lResultSet.next()) {
        System.out.println(lResultSet.getTimestamp(1));
    }

```

Output : `2015-09-08 13:11:11.0`

The desired output is `2015-09-08 13:11:11`

It can be achieved by using SimpleDateFormat :

`new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(lResultSet.getTimestamp(1).getTime())`

Can it be possible without using SimpleDateFormat? Is there any other way by which the result set itself gives me in the desired format?

What I need is that the statement 
`lResultSet.getTimestamp(1)`

directly gives me the output `2015-09-08 13:11:11`.