I need to get date format like:
"yyyy-mm-dd am"
or
"yyyy-mm-dd pm"
In Java for Android
I do not need current time, only yyyy-mm-dd plus am/pm
how to make it directly ?
i use the method below to get current date:
private static String getDate(){
Calendar c = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
return sdf.format(c.getTime());
}