Ling Oracle timestamp转换问题

go_now 2015-11-14 06:46:06
自动生成的是把timestamp 转换为 Datetime 可是如果运行就会出错了,提示如下
Members 'System.Nullable`1[System.DateTime] Utime' and 'System.Nullable`1[System.DateTime] Birthday' both marked as row version."

请问如何配置可以顺利把timestamp 转换了?
...全文
925 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
把时间装换为int类型的Stamp public static int DateTimeToStamp(this DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); return (int)(time - startTime).TotalSeconds; } 再把INT类型的Stamp转换回来 public static System.DateTime ConvertIntDateTime(this int d) { System.DateTime time = System.DateTime.MinValue; System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); time = startTime.AddSeconds(d); return time; }
  • 打赏
  • 举报
回复
把timestamp 拆分格式化为日期 或者 timestamp 数据库直接格式化

8,497

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 LINQ
社区管理员
  • LINQ
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧