如何在 LWUIT 中格式化日期变量?
我有一个对象,其类有一个 getter 方法,并且此 getter 方法返回一个 Date 值。我想以 DD/MM/YYYY 格式在标签中显示该值。
如何用 LWUIT 实现这一点?
确实非常感谢
I have an object whose class has a getter method , and this getter method returns a Date value. I want to show this value in a Label in the format DD/MM/YYYY.
How to achieve that with LWUIT ?
Thank you very much indeed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用此代码将日期转换为字符串格式并将此字符串值传递给标签。
You can use this code to convert date to string format and pass the this string value to label.
为了感谢您,我的代码格式化了一个数字:
To thank you here is a code of mine which formats a number :