我必须将字符串值转换为TimeSpan. 但它显示错误。
TimeSpan
字符串未被识别为有效的时间跨度。
代码是:
TimeSpan _time = TimeSpan.Parse("08:55 AM");
我知道它可以解析 中的字符串值"08:55"。但我不需要那个。我必须在字符串中使用 AM 或 PM。在数据库中,列数据类型是time(7),我正在使用entity framework.
"08:55"
time(7)
entity framework
c# asp.net time entity-framework
asp.net ×1
c# ×1
entity-framework ×1
time ×1