Here you can find the source of formatToEapoDate(Date date)
public static String formatToEapoDate(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String EAPO_DATE_FORMAT = "yyyy.MM.dd"; public static String formatToEapoDate(Date date) { try {//from w ww . j a va 2s. c o m return new SimpleDateFormat(EAPO_DATE_FORMAT).format(date); } catch (Exception e) { return null; } } }