Here you can find the source of dateFormat4yyyyMMdd()
public static SimpleDateFormat dateFormat4yyyyMMdd()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static SimpleDateFormat dateFormat4yyyyMMdd() { return new SimpleDateFormat("yyyy-MM-dd"); }/*from w ww . ja v a 2 s . c o m*/ }