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 阅读(318) 评论(0)  编辑  收藏 所属分类: java


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

统计

常用链接

留言簿(6)

随笔分类

随笔档案(17)

文章分类(86)

收藏夹(3)

flex blog

good site

java blog

my friend

tools

抓虾

搜索

最新评论

阅读排行榜

评论排行榜