在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
设置操作系统日期格式 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\International] "iCountry"="86" "iCurrDigits"="2" "iCurrency"="0" "iDate"="2" "iDigits"="2" "iLZero"="0" "iMeasure"="0" "iNegCurr"="2" "iTime"="1" "iTLZero"="1" "Locale"="00000804" "s1159"="上午" "s2359"="下午" "sCountry"="中华人民共和国" "sCurrency"="¥" "sDate"="-" "sDecimal"="." "sLanguage"="CHS" "sList"="," "sLongDate"="yyyy-MM-dd" "sShortDate"="yyyy-MM-dd" "sThousand"="," "sTime"=":" "sLongDate16"="dddd', 'MMMM' 'dd', 'yyyy" "iTimePrefix"="0" "iCentury"="0" "iDayLZero"="1" "iMonLZero"="1" "iChinaYear"="0" "iCalendar"="1" "sTimeFormat"="HH:mm:ss" "sMonDecimalSep"="." "sMonThousandSep"="," "iNegNumber"="1" "sNativeDigits"="0123456789" "NumShape"="1" "iCalendarType"="1" "iFirstDayOfWeek"="6" "iFirstWeekOfYear"="0" "sGrouping"="3;0" "sMonGrouping"="3;0" "sPositiveSign"="" "sNegativeSign"="-" [HKEY_CURRENT_USER\Control Panel\International\Geo] "Nation"="45"
)] public static extern int GetSystemDefaultLCID(); [DllImport("kernel32.dll", EntryPoint = "SetLocaleInfoA")] public static extern int SetLocaleInfo(int Locale, int LCType, string lpLCData); public const int LOCALE_SLONGDATE = 0x20; public const int LOCALE_SSHORTDATE = 0x1F; public const int LOCALE_STIME = 0x1003; public void SetDateTimeFormat() { try { int x = GetSystemDefaultLCID(); SetLocaleInfo(x, LOCALE_STIME, "HH:mm:ss"); //时间格式 SetLocaleInfo(x, LOCALE_SSHORTDATE, "yyyy-MM-dd"); //短日期格式 SetLocaleInfo(x, LOCALE_SLONGDATE, "yyyy-MM-dd"); //长日期格式 } catch (Exception ex) { Console.WriteLine(ex); } }
SQL 动态添加查找条件 if object_id('test')> 0 drop table test create table test (id int primary key , name nvarchar(111)) insert test select 1,'施瓦辛格' union all select 2,'陈道明' select * from test ALTER proc tSDFSDFest @name nvarchar(20) = null as begin --等于 select * from test where name = case when @name is null OR @NAME = '' then name else @name end --相似 select * from test where name LIKE case when @name is null OR @NAME = '' then name else '%'+@name+'%' end end exec tSDFSDFest exec tSDFSDFest '陈道明' exec tSDFSDFest '陈道'
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论