Yahoo Αναζήτηση Διαδυκτίου

Αποτελέσματα Αναζήτησης

  1. This tutorial shows you how to use the CAST() and TO_DATE() to convert a string to a date in SQL.

  2. 24 Ιουν 2009 · cast it to a date, and then you can use CONVERT to get just the date. INSERT MyTable(Column1) SELECT CONVERT(CHAR(8), CAST('2009-06-24 09:52:43.000' AS DATETIME), 112)

  3. In this tutorial, you will learn how to convert a datetime to a DATE in SQL Server by using the CONVERT(), TRY_CONVERT(), and CAST() functions.

  4. 31 Μαΐ 2023 · You can convert a DATETIME to a DATE using the CONVERT function. The syntax for this is CONVERT (datetime, format). For example, to convert the current date and time into just a date: SELECT CONVERT(date, GETDATE()); Result: 2022-09-02. This shows the date only and no time. What other methods exist?

  5. 9 Φεβ 2024 · SELECT CAST(datetime_column AS DATE) FROM table_name; This method is straightforward and widely supported across different SQL databases. It converts the datetime value into a date, discarding the time part.

  6. 25 Αυγ 2017 · Syntax. CAST (expression AS datatype (length)) Parameter Values. Technical Details. More Examples. Example. Convert a value to a varchar datatype: SELECT CAST (25.65 AS varchar); Try it Yourself » Example. Convert a value to a datetime datatype: SELECT CAST ('2017-08-25' AS datetime); Try it Yourself » Previous SQL Server Functions Next .

  7. In SQL Server, you can use use the CONVERT() function to convert a date value from one date data type to another (or between any other data type for that matter).

  1. Γίνεται επίσης αναζήτηση για