zoukankan      html  css  js  c++  java
  • Sql Server与.Net(C#)中星期值对比

    最近发现Sql Server与.Net(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 AssembliesMicrosoftFramework.NETFrameworkv4.5mscorlib.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
        }
    }
  • 相关阅读:
    Sum Root to Leaf Numbers
    Sum Root to Leaf Numbers
    Sort Colors
    Partition List
    Binary Tree Inorder Traversal
    Binary Tree Postorder Traversal
    Remove Duplicates from Sorted List II
    Remove Duplicates from Sorted List
    Search a 2D Matrix
    leetcode221
  • 原文地址:https://www.cnblogs.com/changyou7/p/6694221.html
Copyright © 2011-2022 走看看