About 656,000 results
Open links in new tab
  1. SQL Server CONVERT() Function - W3Schools

    The CONVERT() function converts a value (of any type) into a specified datatype. Tip: Also look at the CAST() function. Syntax

  2. CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 3, 2024 · These functions convert an expression of one data type to another. CAST syntax: CONVERT syntax: Transact-SQL syntax conventions. Any valid expression. The target data type. This includes xml, bigint, and sql_variant. Alias data types can't be used.

  3. Examples for SQL CAST and SQL CONVERT Functions

    Sep 16, 2021 · Learn how to convert SQL Server data to different data types such as string, date, integer and numeric using the CAST and CONVERT functions.

  4. SQL Server CONVERT Function Explained By Practical Examples

    Mar 14, 2019 · This tutorial shows you how to use the SQL Server CONVERT() function to convert a value of one type to another.

  5. What is the Difference Between CAST and CONVERT? - Essential SQL

    Nov 18, 2015 · In many ways CAST and CONVERT are similar. Both are used to convert data from one type to another. Thought their syntax is different, both functions are able to convert values from one formation to another. Anything you can do …

  6. SQL Convert Examples for Dates, Integers, Strings and more

    May 28, 2024 · In this article, we look at how to use the SQL CONVERT function to convert between data types such as date, integers, strings, and more.

  7. SQL Convert Function In Depth - MSSQLTips.com - SQL Server Tips

    Jan 20, 2022 · There are many different use cases that require us to convert data between different data types (nchar, nvarchar, datetime, datetime2, smalldatetime, etc.) in SQL Server T-SQL, SQL queries, stored procedures, SELECT statements, scripts, etc.

  8. Using CAST and CONVERT Functions in T-SQL - PiEmbSysTech

    Feb 19, 2025 · Understanding when to use CAST and when to use CONVERT can improve data manipulation and formatting in SQL Server. In this post, I will explain the differences between these functions, their syntax, and practical use cases.

  9. SQL CONVERT Function: Syntax, Usage, and Examples

    The SQL CONVERT function changes the data type of a value to another, such as converting a number to a string or a string to a date. It’s especially handy when your query needs specific formatting or data compatibility. The general syntax looks like this: CONVERT (data_type (length), expression, style)

  10. SQL Server: CONVERT Function - TechOnTheNet

    This SQL Server tutorial explains how to use the CONVERT function in SQL Server (Transact-SQL) with syntax and examples. In SQL Server (Transact-SQL), the CONVERT function converts an expression from one datatype to another datatype. If the conversion fails, the function will return an error. Otherwise, it will return the converted value.

Refresh