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

    This example displays the current date and time, uses CAST to change the current date and time to a character data type, and finally uses CONVERT display the date and time in the ISO 8601 …

  2. Use TO_DATE in SQL Server 2012 - Stack Overflow

    Nov 9, 2011 · TO_DATE () isn't a valid function in SQL Server (T-SQL) The alternatives depend on what version of SQL Server you are using. CAST () or CONVERT () may be used in any …

  3. SQL Server functions for converting a String to a Date

    Then we showed how, while using SQL Server, converting a string to date can be achieved using these approaches. We explained the system functions provided by SQL Server by giving some …

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

    Sep 26, 2025 · When querying SQL Server data, dates and times may not always be formatted the way you want. In this article, we look at how to use the SQL CONVERT function to format …

  5. SQL Server DateTime To Date

    Apr 2, 2025 · As a Senior SQL database developer, I’ve encountered various scenarios where I needed to extract just the date portion from a DateTime value in SQL Server. I’ll walk you …

  6. SQL Query to Convert DateTime to Date in SQL Server

    Jul 23, 2025 · In this article, we will explain how to convert DateTime to Date in SQL Server using four powerful methods: CAST (), CONVERT (), TRY_CONVERT (), and SUBSTRING ().

  7. SQL Convert String to Date Functions

    SQL provides a CAST() function that allows you to convert a string to a date. The following illustrates the syntax of the CAST() function: Code language: SQL (Structured Query …

  8. 4 Ways to Convert MM/DD/YYYY to DATE in SQL Server

    Aug 16, 2025 · Converting a string in ‘MM/DD/YYYY’ format to a DATE data type in SQL Server is a common task. Below are four options for getting the job done. 1. Using the CONVERT() …

  9. How to use TO_DATE in SQL Server? - CastorDoc

    May 15, 2022 · In this article, we will explore the correct methods for handling date transformations and conversions in SQL Server, including the built-in functions and best …

  10. Format SQL Server Dates with FORMAT Function

    Oct 31, 2025 · In this tip, Date and Time Conversions Using SQL Server, we have a list of the available examples on how to use the CONVERT function to handle different date formats in a …