# Entity type datetime colomn trans to 'yyyy/MM/dd'
###### tags: `spring`
You can use a custom deserializer :
```java=
public class DateDeSerializer extends StdDeserializer<Date> {
public DateDeSerializer() {
super(Date.class);
}
@Override
public Date deserialize(JsonParser p, DeserializationContext ctxt)
throws IOException, JsonProcessingException {
String value = p.readValueAs(String.class);
try {
return new SimpleDateFormat("yyyy/MM/dd").parse(value);
} catch (DateTimeParseException e) {
//throw an error
}
}
}
```
and use like :
```java=
@JsonDeserialize(using = DateDeSerializer.class)
private Date startDate;
```