Java tutorial
import java.sql.Date; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { public static void main(String[] args) throws ParseException { String oldstring = "2013-11-15 00:00:00.0"; java.util.Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").parse(oldstring); String newstring = new SimpleDateFormat("yyyy-MM-dd").format(date); System.out.println(newstring); } }