Skip to content
sneppets

sneppets

  • Algorithms
  • Interview Programs
  • Datastructures
  • Java
  • Golang
  • Cloud
sneppets-java8

Get time units hours and minutes from Date in String format

February 10, 2020February 12, 2020 Editorial StaffLeave a Comment on Get time units hours and minutes from Date in String format

This tutorial shows how to get time units hours and minutes from Date in String format using java.text.SimpleDateFormat class. SimpleDateFormat class allows us to format date to text and to parse text to date.

Java Date, hours, java, simpledateformat
add hours to timestamp unix 2

How to add hours to unix timestamp or epochmilli in java?

February 4, 2020February 12, 2020 Editorial StaffLeave a Comment on How to add hours to unix timestamp or epochmilli in java?

This tutorial explains how to add hours to unix timestamp or epochmilli using TimeUnit in Java. You may face situations like adding hours, minutes and seconds to an timestamp for display purpose in UI. Let’s see how to do that.

Java hours, java, timestamp
Copyright © 2018 Sneppets. All Rights Reserved