Sql Server与.Net(C#)中星期值对比
2017-04-11 16:45
302 查看
最近发现Sql Server与.Net(C#)中星期值居然不匹配,倒不知道依哪一个了。
1、Sql Server
执行结果:
2、C#
1、Sql Server
declare @date datetime; set @date = '2017-04-11';--实际为星期二 select DatePart(weekday,@date);
执行结果:
2、C#
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll #endregion using System.Runtime.InteropServices; namespace System { // // 摘要: // Specifies the day of the week. [ComVisible(true)] public enum DayOfWeek { // // 摘要: // Indicates Sunday. Sunday = 0, // // 摘要: // Indicates Monday. Monday = 1, // // 摘要: // Indicates Tuesday. Tuesday = 2, // // 摘要: // Indicates Wednesday. Wednesday = 3, // // 摘要: // Indicates Thursday. Thursday = 4, // // 摘要: // Indicates Friday. Friday = 5, // // 摘要: // Indicates Saturday. Saturday = 6 } }
相关文章推荐
- [sql server] 非常简单的实例说明 如何用.net访问sql server(asp.net 和 c# )
- C#与SQL Server之间的数据类型对比及在VS2003中空值传递的解决办法(上)
- c#事件Unity与.Net对比
- .net(C#)访问Oracle数据库的几种免安装组件的对比
- .net(C#)访问Oracle数据库的几种免安装组件的对比
- .net中webform和winform连接sql server 2000数据库的c#操作类
- C# 调 SQL server与Oracle存储过程执行差异对比
- .net中c#访问sql server插入数据时获取自增长列数据
- Java和.NET(C#)的开发用到的技术对比总结
- C#与SQL Server之间的数据类型对比及在VS2003中空值传递的解决办法(下)
- C#向Sql Server中插入记录时单引号的处理- 使用存储过程 .NET教程,C#语言
- C#与SQL Server之间的数据类型对比及在VS2003+中空值传递的解决办法
- C# & SQL Server大数据量插入方式对比
- 一起谈.NET技术,关于C#线程,线程池和并行运算的简单使用和对比
- C#与SQL Server之间的数据类型对比及在VS2003中空值传递的解决办法
- C#与SQL Server之间的数据类型对比及在VS2003中空值传递的解决办法
- 转C#与SQL Server之间的数据类型对比及在VS2003中空值传递的解决办法
- .net(C#)访问Oracle数据库的几种免安装组件的对比
- 在.net(C#)中查找本地及局域网内所有sql server实例
- .net(C#)访问Oracle数据库的几种免安装组件的对比