Pages

Saturday, November 6, 2010

How to Convert Unix Stamp to Java Date ???

To Convert Unix Stamp to Java Date,


Just get the current unix time stamp from this  site.

http://www.epochconverter.com/

long input=1289046903L;

Now multiply the value with 1000

input=input*1000;

Now pass this as input to the constructor or Date Class.
 
java.util.Date D=new java.util.Date ( input );
System.out.println(D) ;

That's it!!! 

No comments:

Post a Comment