Android Utililty Methods Date Current Get

List of utility methods to do Date Current Get

Description

The list of methods to do Date Current Get are organized into topic(s).

Method

DategetCurrentDate()
get Current Date
Calendar c = Calendar.getInstance();
Date date = c.getTime();
return date;
DategetCurrentDate()
get Current Date
return new Date(System.currentTimeMillis());
StringgetCurrentDateStamp()
Get current Date stamp
return convertToDateStamp(System.currentTimeMillis());
DategetCurrentDate()
Get the current Date .
return Calendar.getInstance().getTime();
StringgetCurrentDate()
get Current Date
String dateStr = null;
Date date = new Date();
date.getTime();
int year = date.getYear() + 1900;
int month = date.getMonth() + 1;
int dt = date.getDate();
dateStr = year + "-" + ((month < 10) ? "0" + month : month) + "-"
        + ((dt < 10) ? "0" + dt : dt);
...
StringgetCurrentDateline()
get Current Dateline
DateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return tempDate.format(new java.util.Date());
StringgetCurrentDate()
get Current Date
return getFormatDateTime(new Date(), "yyyy-MM-dd");
CalendargetCurrentDate()
get Current Date
Calendar currDate = Calendar.getInstance();
currDate.setTimeInMillis(System.currentTimeMillis());
currDate.set(Calendar.MONTH, currDate.get(Calendar.MONTH) + 1);
return currDate;
StringgetCurrentDateJSONString()
get Current Date JSON String
return toUTCFormattedString(new Date());