Question: ```
Java.util.Date
startDate : 2020-07-13 09:00:00.0

```

// JSON response

```
"startDate" : 1594611000000

```

I want to display in JSON as 2020-07-13 09:00:00.0

Answer: 
I recommend you switch from the outdated and error-prone `java.util` date-time API to the [modern date-time API](https://www.oracle.com/technical-resources/articles/java/jf14-date-time.html) and format the given date-time using [`DateTimeFormater#ofPattern`](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ofPattern-java.lang.String-) as shown below:

```
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;

public class Main {
    public static void main(String[] args) {
        // Define format
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.S");

        // Get Instant from the time-stamp of 1594611000000
        Instant instant = Instant.ofEpochMilli(1594611000000L);

        // Get OffsetDateTime from instant
        OffsetDateTime odt = instant.atOffset(ZoneOffset.ofHoursMinutes(5, 30));

        // Get LocalDateTime from odt
        LocalDateTime ldt = odt.toLocalDateTime();

        // Get string in the defined format
        String dateTimeStr = formatter.format(ldt);

        // Display the formatted ldt
        System.out.println(dateTimeStr);
    }
}

```

**Output:**

```
2020-07-13 09:00:00.0

```

**Note:** `LocalDateTime` drops the important information of time-zone and zone-offset from it. Choose the right date-time object from the [list](https://docs.oracle.com/javase/tutorial/datetime/iso/overview.html) given below as per your requirement:

[![enter image description here](https://i.stack.imgur.com/jUYEY.png)](https://i.stack.imgur.com/jUYEY.png)
You mention that your variable startDate is of Date type, now i don't know what language you are using but i can try an educated guess of what you need to do :

Format you Date type in order to have a String type and put that String in your JSON. Being a String and not the interpretation of a Timestamp, is shouldn't be converted.