Android examples for java.util:Date Format
get Now Date in yyyy-MM-dd format
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getNowDate() { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date curDate = new Date(); return formatter.format(curDate); }//from w w w .ja va2s. c om }