Answers for "how to get current day 1st hour time in ms java"

0

get time until start of next hour in java

LocalDateTime start = LocalDateTime.now();
    // Hour + 1, set Minute and Second to 00
    LocalDateTime end = start.plusHours(1).truncatedTo(ChronoUnit.HOURS);

    // Get Duration
    Duration duration = Duration.between(start, end);
    long millis = duration.toMillis();
Posted by: Guest on December-02-2020

Code answers related to "how to get current day 1st hour time in ms java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language