Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

date format in android

String date="Mar 10, 2016 6:30:00 PM";
SimpleDateFormat spf=new SimpleDateFormat("MMM dd, yyyy hh:mm:ss aaa");
Date newDate=spf.parse(date);
spf= new SimpleDateFormat("dd MMM yyyy");
date = spf.format(newDate);
System.out.println(date);
Source by developer.android.com #
 
PREVIOUS NEXT
Tagged: #date #format #android
ADD COMMENT
Topic
Name
5+8 =