In this section, you will learn to convert a millisecond into a date.
Description of program:
This program helps you in converting milliseconds into a date. It uses some java methods and APIs. you need a millisecond that have to be converted. The taken milliseconds is passed in the Date() constructor. It is then passed through the format() method that invokes with SimpleDateFormat() and it provides the given format.
The code of the program is given below:
The output of the program is given below:
C:\date>java MillisecondToDate Jan 14,1970 04:23
Posted on: June 16, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles