java.time.LocalDateTime.with(TemporalField field, long newValue)


java.time.LocalDateTime.with(TemporalField field, long newValue)

package com.codingdict;

import java.time.LocalDateTime;
import java.time.temporal.ChronoField;

public class LocalDateTimeDemo {
   public static void main(String[] args) {

      LocalDateTime date = LocalDateTime.parse("2017-01-03T10:15:30");
      LocalDateTime result = date.with(ChronoField.DAY_OF_MONTH,13);
      System.out.println(result);  
   }
}