如何在android datepicker中显示每月的前三个字母 [英] How to display First three letters of the month in android datepicker

查看:139
本文介绍了如何在android datepicker中显示每月的前三个字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在日期选择器中,我尝试用字母
表示月份中的月份,该月份返回全月名称。但是我想要一个月的前三个字母。

In date Picker I tried to get month in letter others are in integer It's returning full name of the month. But i want first threes letters of the month.

我尝试过:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy,MMMM, dd ");
System.out.println(sdf.format(new SimpleDateFormat(new Date()).toString()));

输出:2013年10月18日

output: 2013-October-18

我希望输出为:2013年10月18日

I want output as : 2013-Oct-18

推荐答案

使用 MMM ,例如 SimpleDateFormat( yyyy-MMM-dd)

这篇关于如何在android datepicker中显示每月的前三个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆