SQL Server offers numerous built-in system functions.
Many of these perform operations and conversions on values.
Others support logic and return information about data values.
This function parses string values and converts these to a different data types.
SELECT PARSE('1859' AS INT) AS '1859',
PARSE('1859' AS DECIMAL(10, 2)) AS '1859.',
PARSE('10/15/21' AS DATETIME) AS '10/15/21',
PARSE('10/15/21 08:15 PM' AS DATETIME2) AS '10/15/21 08:15 PM'
1859 | 1859 | 10/15/21 | 10/15/21 08:15 PM |
---|---|---|---|
1859 | 1859.00 | 2021-10-15 00:00:00.000 | 2021-10-15 20:15:00.0000000 |
These are the built-in system functions in SQL Server.
Click on a function for more details.
Function | Description |
---|---|
CAST | CAST Function |
CONVERT | CONVERT Function |
CHOOSE | CHOOSE Function |
ISNULL | ISNULL Function |
ISNUMERIC | ISNUMERIC Function |
IIF | IIF Function |
NULLIF | NULLIF Function |
PARSE | PARSE Function |
TRY_CAST | TRY_CAST Function |
TRY_CONVERT | TRY_CONVERT Function |
TRY_PARSE | TRY_PARSE Function |