Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android parse time


try {
        Date now = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("UTC"));
        Date past = format.parse("2016-01-24T16:00:00.000Z");
        DebugTool.logD("TIMEEE " + now.getTime());
        DebugTool.logD("TIMEEE PAST" + past.getTime());
   } catch (ParseException e) {
        e.printStackTrace();
   }

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #android #parse #time
ADD COMMENT
Topic
Name
4+6 =