这应该很简单
customerSearch.get("DateOfBirth")
其中customerSearch 是a HashMap<String, Object>
,它是公历日期。
但我需要一个普通的Date
对象。
我试过了
Date dateOfBirth = new Date(
((GregorianCalendar) customerSearch.get("DateOfBirth")).getTimeInMillis());
但说公历日期不能转换为日期。
有什么帮助吗?