通过SQLCLR获取SQLServer服务器上控制面板设定的日期格式不正确?
[Microsoft.SqlServer.Server.SqlFunction()]
public static string GetShortDatePattern()
{
return System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
}
select dbo.GetShortDatePattern()
显示 yyyy/M/d
无论在控制面板上怎么修改日期格式,都是显示一个固定的日期格式"yyyy/M/d"?
请高手给予帮助。