Java tutorial
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static void main(String[] args) throws ParseException { SimpleDateFormat inFormat = new SimpleDateFormat("yyyy-MM-dd-'T'HH:mm:ss'Z'"); Date inDate = inFormat.parse("2015-01-11-T00:00:00Z"); SimpleDateFormat outFormat = new SimpleDateFormat("yyyyMMdd"); String output = outFormat.format(inDate); System.out.println("Date: " + output); } }