标签:
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
版权声明:本文博主原创文章,博客,未经同意,不得转载。
标签:
原文地址:http://www.cnblogs.com/yxwkf/p/4758719.html