Posted By

hariharank12 on 12/01/10


Tagged

java javaDateFormat javaTimeStamp javaTimeStampToDateConversion timeStampInJava dateFormatJava


Versions (?)

Date formatting in Java


 / Published in: Java
 

  1. Date d1 = new Date(long UnixTimestamp);
  2. SimpleDateFormat date_format = new SimpleDateFormat("MMM dd,yyyy HH:mm:ss");
  3. System.out.println(date_format.format(d1));

Report this snippet  

You need to login to post a comment.