Convert a java.time.Instant to java.sql.Timestamp and vice-versa.
Search Results for: java.time
Checking if a Date Object Equals Yesterday
Explore various approaches for determining whether a given date object falls on yesterday.
Convert Gregorian to Hijri Date in Java
Explore various ways to convert a Gregorian date to a Hijri date.
Difference between ZoneOffset.UTC and ZoneId.of(“UTC”)
Explore the ZoneOffset.UTC and ZoneId.of(“UTC”) methods and their key differences and use cases.
Check if Two Date Ranges Overlap
Explore different scenarios of date range overlap and dive into various approaches and formulas to check for overlaps
Format LocalDate to ISO 8601 With T and Z
Explore various techniques for formatting a LocalDate to the ISO 8601 format. This format includes the ‘T’ separator and the ‘Z’ indicating UTC time.
Value-Based Classes in Java
Explore value-based classes and the notion of value types in Java.
Format Multiple ‘or’ Conditions in an If Statement in Java
Learn how to improve the readability of multiple conditions in an if statement.
Guide to Java Jackson-jr Library
Learn how to read and write JSONs easily with a lightweight Jakson-jr library.
New Features in Java 20
Explore some of the new features and changes introduced as part of the incremental Java 20 release.
Disable Wildcard Import in IntelliJ
Learn how to set three main configuration options to disable wildcard imports in Java files in IntelliJ.
Parsing Date Strings with Varying Formats
Explore strategies for parsing multiple date formats at once.
Hibernate @CreationTimestamp and @UpdateTimestamp
This article explains how to use Hibernate annotations @CreationTimestamp and @UpdateTimestamp to track the creation and update timestamps of an entity in a Java application using the Hibernate framework.
OffsetDateTime Serialization With Jackson
Learn how to serialize and deserialize OffsetDateTime with Jackson in Java.
How to Determine Date of the First Day of the Week Using LocalDate in Java
Learn about the date of the first day of the week from LocalDate in Java.
Map Date Types With OpenAPI Generator
Learn how to map dates in various formats with OpenAPI
Convert java.util.Date to java.sql.Date
Learn how to convert a java.util.Date to a java.sql.Date.
Convert String to Instant
Learn how to convert String to Instant with Java.
How to Check Whether an Integer Exists in a Range with Java
Learn how to check whether an integer exists within the bounds of a range.
How to Calculate “Time Ago” in Java
Explore several solutions for calculating “time ago” in Java.