【发布时间】:2013-11-24 16:19:43
【问题描述】:
我正在使用
ts = DateTime.ParseExact(s, "dd/MMM/yyyy:hh:mm:ss", CultureInfo.InvariantCulture);
解析我在数据库中输入的日期...当我在 Visual Studio 2012 中选择 AnyCPU 设置时,它工作正常... 当我将其更改为 x64 设置时,出现异常
“System.FormatException”类型的未处理异常发生在 mscorlib.dll
附加信息:字符串未被识别为有效的日期时间。
有人可以帮忙吗?
【问题讨论】:
-
你的
s到底是什么? -
没有多少常见的日期字符串在年份和小时之间有
:。不要让我们猜测字符串。 -
s 类似于 "31/Oct/2013:12:12:28"...
-
@onedevteam.com 它适用于我的机器(x64)。你确定吗?
-
也适合我。
标签: c# datetime visual-studio-2012 64-bit