java 日期數字

          public static void main(String[] args) {
                  
          long a=100011;
                  
          long b=200022;
                  Double d
          =new Double(b-a);
                  DecimalFormat   fmt   
          =   new   DecimalFormat("##,###,###,###,##0.00");   
                  System.out.println(fmt.format(d
          /100));    

                  NumberFormat nf 
          = NumberFormat.getCurrencyInstance();
                  System.out.println(nf.format(
          88888.88));


          }


              Calendar calendar = Calendar.getInstance();
              //getTime()方法是取得當前的日期,其返回值是一個java.util.Date類的對象
              res.setResOpenDate(calendar.getTime());
              int day = calendar.get(Calendar.DAY_OF_YEAR);
              calendar.set(Calendar.DAY_OF_YEAR, day + 30);
              //投票的有效期30天
              res.setResEndDate(calendar.getTime());

          posted on 2007-04-23 13:55 leoli 閱讀(352) 評論(0)  編輯  收藏 所屬分類: java

          導航

          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          統計

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案(17)

          文章分類(86)

          收藏夾(3)

          flex blog

          good site

          java blog

          my friend

          tools

          抓蝦

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 巴塘县| 马尔康县| 罗甸县| 资兴市| 托克托县| 文化| 朝阳区| 甘谷县| 阳高县| 稷山县| 乐至县| 卢氏县| 大埔区| 英山县| 台东县| 青州市| 沙雅县| 长岭县| 柳州市| 日土县| 开鲁县| 安溪县| 平江县| 雷山县| 凤冈县| 山西省| 柏乡县| 巨鹿县| 泽州县| 土默特左旗| 大埔县| 儋州市| 民县| 乌拉特中旗| 普格县| 怀化市| 遂平县| 忻州市| 黄梅县| 宁蒗| 安庆市|