我正在尝试在Google中提取用户的生日并将其保存到数据库中,但是问题是我遇到了一个错误消息:“无法将类型字符串隐式转换为System.DateTime”,如何解决此问题?>
var user = new ApplicationUser
{
FirstName = info.Principal.FindFirst(ClaimTypes.GivenName).Value,
LastName = info.Principal.FindFirst(ClaimTypes.Surname).Value,
Birthdate = info.Principal.FindFirst(ClaimTypes.DateOfBirth).Value,
Country = info.Principal.FindFirst(ClaimTypes.Country).Value,
Email = info.Principal.FindFirst(ClaimTypes.Email).Value,
UserName = info.Principal.FindFirst(ClaimTypes.Email).Value
};