Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Web Technologies
40.1k+ articles
DSA
22.3k+ articles
Python
20.2k+ articles
Experiences
17k+ articles
Interview Experiences
13.7k+ articles
School Learning
11.6k+ articles
JavaScript
11.5k+ articles
Java
10.3k+ articles
Java-Functions
4.1k+ articles
Java-time package
570+ articles
Java-Duration
62 posts
Popular Articles
Recent Articles
Duration toHours() method in Java with Examples
Last Updated: 26 November 2018
The toHours() method of Duration Class in java.time package is used get the value of this duration in number of hours.Syntax:public long toH
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration ofSeconds(long, long) method in Java with Examples
Last Updated: 26 November 2018
The ofSeconds(long, long) method of Duration Class in java.time package is used to get a duration in a 1 second format. In this method, the
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration get(TemporalUnit) method in Java with Examples
Last Updated: 26 November 2018
The get(TemporalUnit) method of Duration Class in java.time package is used to get the value of the unit passed as the parameter. Only units
...read more
Java
Java-Functions
Java-time package
Java-Duration
Similar Topics
Web Technologies
40.1k+ articles
DSA
22.3k+ articles
Python
20.2k+ articles
Experiences
17k+ articles
Interview Experiences
13.7k+ articles
School Learning
11.6k+ articles
JavaScript
11.5k+ articles
Java
10.3k+ articles
Java-Functions
4.1k+ articles
Java-time package
570+ articles
Duration toHoursPart() method in Java with Examples
Last Updated: 26 November 2018
The toHoursPart() method of Duration Class in java.time package is used get the value of this duration in number of hours by dividing the nu
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration between(Temporal, Temporal) method in Java with Examples
Last Updated: 26 November 2018
The between(Temporal) method of Duration Class in java.time package is used to get a Duration in between the two Temporal objects passed as
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration abs() method in Java with Examples
Last Updated: 26 November 2018
The abs() method of Duration Class in java.time package is used to get an immutable copy of this duration with the absolute duration.Syntax:
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration toSecondsPart() method in Java with Examples
Last Updated: 26 November 2018
The toSecondsPart() method of Duration Class in java.time package is used get the value of this duration in number of seconds by dividing th
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration toMillisPart() method in Java with Examples
Last Updated: 26 November 2018
The toMillisPart() method of Duration Class in java.time package is used get the value of this duration in number of milli-seconds by dividi
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration toDays() method in Java with Examples
Last Updated: 26 November 2018
The toDays() method of Duration Class in java.time package is used get the value of this duration in number of days.Syntax:public long toDay
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration minus(Duration) method in Java with Examples
Last Updated: 10 October 2021
The minus(Duration) method of Duration Class in java.time package is used to get an immutable copy of this duration with the specified durat
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration toMillis() method in Java with Examples
Last Updated: 26 November 2018
The toMillis() method of Duration Class in java.time package is used get the value of this duration in number of milli-seconds.Syntax:public
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration plus(Duration) method in Java with Examples
Last Updated: 26 November 2018
The plus(Duration) method of Duration Class in java.time package is used to get an immutable copy of this duration with the specified durati
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration ofDays(long) method in Java with Examples
Last Updated: 13 February 2023
The ofDays(long) method of Duration Class in java.time package is used to get a duration in a 24 hour format. In this method, the seconds ar
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration isNegative() method in Java with Examples
Last Updated: 26 November 2018
The isNegative() method of Duration Class in java.time package is used to check if this duration is negative or not. It returns a boolean va
...read more
Java
Java-Functions
Java-time package
Java-Duration
Duration isZero() method in Java with Examples
Last Updated: 26 November 2018
The isZero() method of Duration Class in java.time package is used to check if this duration is of 0 length ot not. It returns a boolean val
...read more
Java
Java-Functions
Java-time package
Java-Duration
First
1
2
3
4
5
>>
Last
First
1
2
3
4
5
>>
Last
First
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !