我在转换字符串格式的日期时间时遇到问题,但无法使用"yyyyMMdd"
格式进行转换。
我的代码是:
string tpoc = refSubClaim.BenefitsFolder.BenefitFolderIdNumber.ToString();
string[] tpocinfo = Regex.Split(tpoc,";");
for (int i = 0; i < tpocinfo.Length; i++)
{
switch (i)
{
case 0:
{
string[] tpoc2 = Regex.Split(tpocinfo[0], ",");
claimantAuxillaryRecord.TPOCDate2 = tpoc2[0].ToString();
claimantAuxillaryRecord.TPOCAmount2 = Convert.ToDecimal(tpoc2[1]);
claimantAuxillaryRecord.FundingDelayedBeyondTPOCStartDate2 = tpoc2[2].ToString();
}
break;
obj.ToString("yyyyMMdd")
;