Date From Timestamp in Long format

Generally, the dates are stored in long timestamp format in the database.
This simple class can convert the timestamp date to real date format.

package com.kushal.util;
import java.util.Date;
public class DateFromLong {

	public static void main(String ags [])
	{
		long dateInLongFormat=1212499200000L;
		Date date=new Date(dateInLongFormat);

		System.out.println(date);

	}

}

Here is the sample output for the long date give above:

Tue Jun 03 08:20:00 CDT 2008