I need to understand the date format returned by cursor in android -


what date means: 1427856000472? have got date cursor.getstring(4). need receiving date of message, format not clear me. kindly help, , thank sharing knowledge.

its in time in milliseconds .. need convert them proper time.. following thing followed.. return date month , year timestamp equal time .. eg 1427856000472

    final calendar cal = calendar.getinstance();     java.text.dateformat df= dateformat.getmediumdateformat(mctx);     java.text.dateformat df1=dateformat.gettimeformat(mctx);       string date = (df.format(timestamp).tostring());      string  time=df1.format(timestamp);     cal.settimeinmillis(timestamp);     int messageyear=cal.get(calendar.year);      int month=cal.get(calendar.month);     int dates=cal.get(calendar.date);     locale locale=locale.getdefault();     string monthname=cal.getdisplayname(calendar.month, calendar.short , locale);      string date =  monthname+" "+dates+"\n"+time;  

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -