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
        }
    }
  • 相关阅读:
    ATM
    Python不同目录间模块调用
    Python跨目录调程序
    Python软件目录结构规范
    进程的创建-multiprocessing
    进程
    多任务版udp聊天器
    死锁
    互斥锁
    同步
  • 原文地址:https://www.cnblogs.com/changyou7/p/6694221.html
Copyright © 2011-2022 走看看