17/09/2013
این 3 تا دستوررو در SQL 2012 اجرا کنید
SELECT CAST('Saturday, 18 February 2012' AS datetime2) AS [Using CAST Function]
GO
SELECT CONVERT(datetime2, 'Saturday, 18 February 2012') AS [Using CONVERT Function]
GO
SELECT PARSE('Saturday, 18 February 2012' AS datetime USING 'en-GB') AS [Using PARSE Function]
GO
خواهید دید که فقط دستور PARSE قابلیت تبدیل این نوع Stringها رو به فرمت datetime داره.PARSE درنسخه 2012 به SQLاضافه شده.فقط یادتون باشه که اگرNullرو بعنوان ورودی به این تابع بدید همون Nullرو بعنوان نتیجه دریافت میکنید.
اگر مایلید بیشتر دراین زمینه بدونید، لینک زیر رو دنبال کنید
http://technet.microsoft.com/en-us/library/hh213316.aspx
If the culture argument is not provided, then the language of the current session is used. This language is set either implicitly, or explicitly by using the SET LANGUAGE statement. culture accepts any culture supported by the .NET Framework; it is not limited to the languages explicitly supported b...