开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜