About 67,100 results
Open links in new tab
  1. CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn

    This example displays a date and time as character data, uses CAST to change the character data to the datetime data type, and then uses CONVERT to change the character data to the datetime data …

  2. Convert Datetime to String in a Specified Format in SQL Server

    In this tutorial, you will learn how to convert datetime to string in a specified format in SQL Server by using the CONVERT () function.

  3. How To Convert Date To String In SQL Server

    Jun 11, 2025 · In this comprehensive article, I’ll walk you through everything you need to know about converting dates to strings in SQL Server.

  4. How to convert a datetime to string in T-SQL - Stack Overflow

    Feb 22, 2013 · MSDN suggests: Use the FORMAT function for locale-aware formatting of date/time and number values as strings. For general data type conversions, use CAST or CONVERT.

  5. SQL Date Format Examples using SQL CONVERT Function - SQL Server

    Sep 26, 2025 · Learn how to use SQL CONVERT for different SQL date format options and achieve the desired date representation.

  6. SQL Query to Convert Datetime to String - GeeksforGeeks

    Jul 23, 2025 · In order to convert a DateTime to a string, we can use CONVERT () and CAST () function. These functions are used to converts a value (of any datatype) into a specified datatype.

  7. SQL convert date to string

    In SQL Server, converting a date to a string involves using the CONVERT or FORMAT functions. These functions allow you to customize the output format of the date according to your requirements.

  8. How to Convert Datetime to String in T-SQL: Retain Date & Time for …

    Dec 13, 2025 · This blog dives deep into reversible datetime-to-string conversions in T-SQL, focusing on retaining both date and time components to ensure data integrity. We’ll explore key functions, step …

  9. SQL Server CONVERT () Function - W3Schools

    Example Convert an expression from one data type to another (datetime): SELECT CONVERT(datetime, '2017-08-25'); Try it Yourself »

  10. When to Use CONVERT () vs CAST () for Date Formatting in SQL Server

    Aug 6, 2025 · When formatting dates in SQL Server you may be wondering whether to use CONVERT() or CAST(). After all, both functions allow us to convert between data types. Let’s take a look at at …