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