Labels

Wednesday, April 3, 2013

Parse()

--Parse() function will parse an value into specified datatype. This function relies on CLR.
--It will take some performance overhead. Use this function only to convert strings to/from datetime and numeric values.

Example:

SELECT PARSE('Monday, 13 December 2010' AS datetime2 USING 'en-US') AS Result

GO

SELECT PARSE('€345,98' AS money USING 'de-DE') AS Result

No comments:

Post a Comment