Home > Net >  Take milliseconds, use TryParse couldn't convert
Take milliseconds, use TryParse couldn't convert

Time:11-12

Take milliseconds, use TryParse cannot transform, become "0001/1/1 0:00:00", why?
That this take milliseconds comparing what is the mode of transformation, achieve the goal of control?

 string drValue="HTTP://https://bbs.csdn.net/topics/2020-07-24 18:42:29 860"; 
System. A DateTime dateR.
Bool RTS=System. A DateTime. TryParse (drValue, out dateR);

CodePudding user response:

 string drValue="https://bbs.csdn.net/topics/2020-07-24 18:42:29. 860"; 

Space in front of milliseconds to end

CodePudding user response:

With a DateTime. ParseExact
MM - dd yyyy - HH: MM: ss FFF

CodePudding user response:

https://www.cnblogs.com/itjeff/p/9018742.html
https://docs.microsoft.com/zh-cn/dotnet/api/system.datetime.tryparseexact
  •  Tags:  
  • C#
  • Related