About 136,000 results
Open links in new tab
  1. sql server - How to get a date in YYYY-MM-DD format from a …

    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 …

  2. sql server 2005 - how to format getdate into …

    Apr 22, 2014 · In SQL Server how do I format getdate() output into YYYYMMDDHHmmSS where HH is 24 hour format? I've got the YYYYMMDD done with select …

  3. sql server - SQL datetime format to date only - Stack Overflow

    I am trying to select the DeliveryDate from sql database as just date. In the database, i am saving it as datetime format. How is it possible to get just date?? SELECT Subject, DeliveryDate from

  4. Custom Date/Time formatting in SQL Server - Stack Overflow

    Please refer to "SQL Server", not "SQL", because different databases have different way to format dates.

  5. Formato DATETIME SQL Server - Stack Overflow em Português

    Jul 9, 2019 · Esta é a forma de exibir a data, o banco de dados só retorna a data, como apresentá-la é feito depois. Você pode formatar as datas de algumas maneiras diferentes no …

  6. How do I convert SQL getdate() function into a string in …

    Feb 28, 2011 · In case someone gets confused using a format that returns a longer string, the varchar(10) is going to truncate your string. You can do the following to avoid this: …

  7. sql - Converting getdate () to yyyymmdd & getting the date two …

    I have found a couple of different methods to convert it. However, I still get the yyyy-mm-dd format or yyyy-mm-dd hh:mm:ss. I am currently using SQL Server 2014. SELECT dateadd(day, …

  8. How to get Time from DateTime format in SQL? - Stack Overflow

    Feb 9, 2011 · I want to get only Time from DateTime column using SQL query using SQL Server 2005 and 2008 Default output: AttDate == 2011-02-09 13:09:00 2011-02-09 14:10:00 I'd like ...

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

    Jul 16, 2023 · 2 Actually, this is the proper way to get what you want, unless you can use MS SQL 2014 (which finally enables custom format strings for date times). To get yyyymm instead of …

  10. sql - How to convert datetime to date only (with time set to …

    1 If you will always have the date in the same format, i.e. yyyy-MM-DD you can grab the first 10 characters if the value and insert that which is the equivelant of 00:00:00.0000 time for that date.