About 485,000 results
Open links in new tab
  1. How to convert a "dd/mm/yyyy" string to datetime in SQL Server?

    May 6, 2010 · I've got a similar situation where the date is being held as a string in a UK format with slashes on SQL 2012 (dd/mm/yyyy). The only thing which works for me is CONVERT …

  2. sql server - T-SQL Cast versus Convert - Stack Overflow

    Apr 1, 2009 · What is the general guidance on when you should use CAST versus CONVERT? Is there any performance issues related to choosing one versus the other? Is one closer to ANSI …

  3. How to convert SQL Server's timestamp column to datetime format

    Nov 14, 2011 · So you cannot convert a SQL Server TIMESTAMP to a date/time - it's just not a date/time. But if you're saying timestamp but really you mean a DATETIME column - then you …

  4. Convert a string to int using sql query - Stack Overflow

    Apr 8, 2009 · How to convert a string to integer using SQL query on SQL Server 2005?

  5. sql - Get Hours and Minutes (HH:MM) from date - Stack Overflow

    Jan 17, 2013 · Here is syntax for showing hours and minutes for a field coming out of a SELECT statement. In this example, the SQL field is named "UpdatedOnAt" and is a DateTime. Tested …

  6. What is the best way to convert an int or null to boolean value in …

    May 20, 2015 · Additionally, for SQL Server: "The string values 'TRUE' and 'FALSE' can be converted to bit values: 'TRUE' is converted to 1 and 'FALSE' is converted to 0."

  7. Format number as percent in MS SQL Server - Stack Overflow

    May 7, 2015 · I know it is recommended to do formatting in the Application, however this is for an automated export. This is using SQL Server 2008. Here is what I have now: select …

  8. sql - how to convert date to a format `mm/dd/yyyy` - Stack Overflow

    Sep 2, 2013 · Abra Over a year ago Writing the month first is the format used in the United States (USA), so I don't understand this part of your answer: rendered in French format mm/dd/yyyy …

  9. sql - How to cast the DateTime to Time - Stack Overflow

    Mar 19, 2015 · In this article published in 2000 the writer explains in depth how SQL Server treats dates and times. I doubt if anything significant changed between 2000 and 2015 in the way …

  10. How to control casting of null int field to varchar in sql server?

    First of all I would like to know how does CAST work with NULL fields and how does it behave when the value is NULL? For example in the expression: (CAST(INT_FIELD as nvarchar(100)) …