i have extracted a csv file from Elastic(Kibana) and i have a date in format like this:
Dec 6, 2022 @ 23:59:59.000
I'm trying to parse this string:
var date = DateTime.Parse("Dec 6, 2022 @ 23:59:59.000");
but i obtain exception:
String 'Dec 6, 2022 @ 23:59:59.000' was not recognized as a valid DateTime.
How can i parse this type of string in a DateTime? Thank you
1条答案
按热度按时间sqyvllje1#
感谢@phuzi使用了DateTime.ParseExact并使用了正确的格式,我成功地解析了日期,下面是代码:
谢谢你