How to get date from timestamp?

How can I get date from timstamp data? for example , I have timestamp "2007-05-07 12:30:20", I want to get only date "2007-05-07", how can I do?
[151 byte] By [Mellona] at [2007-11-27 3:48:22]
# 1
1. Use the getTime() method of Timestamp to get a long (milliseconds).2. Make a new Date object with the long (milliseconds) as the parameter to constructor.3. Use SimpleDateFormat's format() method to format the date into the appropriate String.
nogoodatcodinga at 2007-7-12 8:52:15 > top of Java-index,Java Essentials,Java Programming...