Code example for GregorianCalendar

Methods: formatsetTimeInMillis

    * @param  t 
    *         timestamp in milliseconds (see {@link java.util.Date#getTime()}). 
    * @return String of the date. 
   public static String getDateString(long t) {
      GregorianCalendar gc = new GregorianCalendar();
      return DateFormat.format("dd.MM.yyyy", gc).toString();
    * Returns the app data as json. 
    * @return {@link org.json.JSONArray JSONArray} 
   public JSONArray getJSonData() {
      JSONArray dataList = new JSONArray();
      JSONObject data;
      Cursor c = fetchAllEntries(null);
Stop searching for code, let great code find you!  Add Codota to your java IDE