About 50 results
Open links in new tab
  1. sql server - How to get a date in YYYY-MM-DD format from a TSQL ...

    Feb 22, 2017 · How do I retrieve a date from SQL Server in YYYY-MM-DD format? I need this to work with SQL Server 2000 and up. Is there a simple way to perform this in SQL Server or would it be …

  2. Convert Date format into DD/MMM/YYYY format in SQL Server

    Jun 25, 2013 · I have a query in SQL, I have to get a date in a format of dd/mm/yy Example: 25/jun/2013. How can I convert it for SQL server?

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

    Sep 2, 2013 · I'm having a sql table with date column named CREATED_TS which holds the dates in different format eg. as shown below Feb 20 2012 12:00AM 11/29/12 8:20:53 PM Feb 20 2012 …

  4. How to convert from one date format to another, in Microsoft SQL …

    The source date (date in 101 format) is stored as a varchar initially, so I am guessing you would first need to convert it to a date type before changing it's format. So practically my question is, "how do …

  5. Convert a SQL Server datetime to a shorter date format

    Oct 27, 2010 · 90 I have a datetime column in SQL Server that gives me data like this 10/27/2010 12:57:49 pm and I want to query this column but just have SQL Server return the day month and …

  6. sql - Convert string to date in specific format - Stack Overflow

    Jul 22, 2014 · How do I convert a string to a date type in SQL Server 2008 R2? My string is formatted dd/mm/yyyy I tried this SELECT CAST('01/08/2014' AS DATE) But that does the cast in mm/dd/yyyy …

  7. Sql server convert datetime to ''YYYY-MM-DD'T'HH:mm:ss.SSS'Z"

    Aug 15, 2006 · You forgot a critical piece of information that is always missing in these date format type questions: what data type is start_date. Also a datetime is always best kept in a datetime data type.

  8. sql - Convert date to YYYYMM format - Stack Overflow

    Jul 16, 2023 · To obtain a format modification for such type of value, in case u wanted to apply it for the whole column, u had to do the following: SELECT TO_DATE (variable-which-format-u-wanna …

  9. sql - How to convert DateTime to VarChar - Stack Overflow

    I need to convert a value which is in a DateTime variable into a varchar variable formatted as yyyy-mm-dd format (without time part). How do I do that?

  10. t sql - How to format datetime in SQL SERVER - Stack Overflow

    Jun 6, 2025 · SELECT FORMAT(CURRENT_TIMESTAMP, 'yyyy-MM-dd hh:mm:ss tt') In prior versions, you might need to concatenate two or more different datetime conversions to get what you need, for …