标签:java 获取某年某季度的第一天
1、错误描述
Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Date at java.text.DateFormat.format(Unknown Source) at java.text.Format.format(Unknown Source) at com.you.freemarker.model.FirstDayOfQuarter.getFirstDayOfQuarter(FirstDayOfQuarter.java:50) at com.you.freemarker.model.FirstDayOfQuarter.main(FirstDayOfQuarter.java:64)
//格式化日期 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String firstDayOfQuarter = sdf.format(FisrtDayOfMonth.getFisrtDayOfMonth(year, month));
3、解决办法
将FisrtDayOfMonth.getFisrtDayOfMonth(year, month)转化为Date
Java获取某年某季度的第一天出错,布布扣,bubuko.com
标签:java 获取某年某季度的第一天
原文地址:http://blog.csdn.net/you23hai45/article/details/27594721