Returns a copy of this LocalDateTime with the minute-of-hour field replaced with the specified minute value. This method will throw exception for an invalid value of minute e.g. 61.
Examples
package com.logicbig.example.localdatetime;
import java.time.LocalDateTime;
public class WithMinuteExample {
public static void main (String... args) { LocalDateTime d = LocalDateTime.of(2000, 1, 2, 10, 20, 22); LocalDateTime d2 = d.withMinute(30); System.out.println(d2); } }