Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在文本字段中有如下日期 2012-09-27T11:41:16:587Z
我将如何做 ParseExact?
我想我很接近 DateTime convertDate = DateTime.ParseExact(date, "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture); 但它出错了......
奇怪的是没有人回答这个问题。这将起作用:
DateTime.ParseExact(date, @"yyyy-MM-dd\THH:mm:ss:fff\Z", CultureInfo.InvariantCulture);
与您的格式字符串相比,唯一的区别是我包含"fff"了毫秒,并且我在您的字符串中输入@"\T"并@"\Z"处理了字母 T 和 Z。date
"fff"
@"\T"
@"\Z"
date
I want to get all my that's inside . I wrote this code:
matchObj = re.search(r'<tr>(.*?)</tr>', txt, re.M|re.I|re.S)
but I only get the first group.