Check out example codes for "convert localdatetime to localdate". It will help you in understanding the concepts better.

Code Example 1

import java.time.LocalDate;
import java.time.LocalDateTime;
 
public class Main {
    public static void main(String[] args) {
 
        LocalDateTime localDateTime = LocalDateTime.now();
         
        LocalDate localDate = localDateTime.toLocalDate();
         
        System.out.println(localDate);
    }
}

Learn ReactJs, React Native from akashmittal.com