Here you can find the source of getMySQLDateFormat()
public static String getMySQLDateFormat()
//package com.java2s; import java.util.Calendar; public class Main { public static String getMySQLDateFormat() { //Membuat string tanggal sekarang Calendar now = Calendar.getInstance(); int month = now.get(Calendar.MONTH) + 1; int day = now.get(Calendar.DAY_OF_MONTH); int year = now.get(Calendar.YEAR); return year + "-" + month + "-" + day; }//from w w w .j av a2 s. c o m }