Java Program to Get a Date From Milliseconds Using Date() Constructor

You are currently viewing Java Program to Get a Date From Milliseconds Using Date() Constructor

Java program to get a date from milliseconds using Date() constructor

// Java program to get a date from milliseconds 
// using Date() constructor

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Date date = new Date(732153600000L);
    System.out.println("Date: " + date);
  }
}

Output

Date: Mon Mar 15 00:00:00 GMT 1993

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply