var birthDate= DateFormat('yyyy/M/dd').parse(tempBirthDate);
print(birthDate);
String dtStringbday = DateFormat('yyyy-MM-dd').format(birthDate);
//print result: 1967-08-16 00:00:00.000
嗨,我正在使用此代码来解析和格式化日期。但是我在Android版本6.0.1 SamsungJ7上出现此错误Error: FormatException: Trying to read yyyy from at position 0
,但在我的Samsung A8 Android版本7.1.1上却没有此错误。 android版本是否会影响日期解析?还是我做错了什么?