13
是否可以在2012年1月4日刪除「0」?在一個月中刪除領先的「0」SimpleDateFormat
我目前使用下面的Java得到的日期格式類似
Monday, January 04, 2012
我想它看起來像
Monday, January 4, 2012
Date anotherCurDate = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("EEEE', 'MMMM dd', ' yyyy");
final String formattedDateString = formatter.format(anotherCurDate);
final TextView currentRoomDate = (TextView) this.findViewById(R.id.CurrentDate);
當然,這將是容易的。我認爲會有一些後期處理來修復它。謝謝,我現在會測試。 – Denoteone 2012-01-12 14:04:26
嘿嘿,它被稱爲'簡單'日期格式化器的原因;)我添加了一個鏈接到它的文檔,以防萬一你沒有看到它。 – Jave 2012-01-12 14:07:17
工作+1,我會在5分鐘內檢查問題 – Denoteone 2012-01-12 14:08:52