Android Date Format Help
Hi guys i am using a simple code to get current date and change its form开发者_运维百科at but i am unable to do so every time i use the SimpleDateFormat class the application crashes with out being executed.
I am pasting my code here:
Date d=new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/YYYY",Locale.ENGLISH);
String newd= formatter.format(d);
can some body point out my mistake that i am making here??
Thank you in advance for your help!!
YYYY
should be yyyy
- SimpleDateFormat
精彩评论