About 385,000 results
Open links in new tab
  1. How to return only the Date from a SQL Server DateTime datatype

    Sep 22, 2008 · Except, say, if you want a query that retrieves all records matching a user-supplied date as the date-part of a certain time field. Good luck doing that only in the presentation layer.

  2. How to query DATETIME field using only date in Microsoft SQL Server ...

    Mar 19, 2014 · I have a table TEST with a DATETIME field, like this: ID NAME DATE 1 TESTING 2014-03-19 20:05:20.000 What I need a query returning this row and every row with date 03/19/2014, no …

  3. How do I query for all dates greater than a certain date in SQL Server ...

    Mar 4, 2010 · I just find it more readable, because it's strikingly obvious that this is a date-time. Too many Database Systems store date values in a varchar field, but you're right about the format. …

  4. sql - Datetime in where clause - Stack Overflow

    How can I select 12/20/2008 in where clause of sql? The server is SQL server 2005. select * from tblErrorLog where errorDate = '12/20/2008'

  5. sql - how to remove time from datetime - Stack Overflow

    Jan 11, 2013 · The field DATE in the database has the following format: 2012-11-12 00:00:00 I would like to remove the time from the date and return the date like this: 11/12/2012

  6. Making a DateTime field in a database automatic?

    The location of the "default value" property is dependent on the version of SQL Server Express you are running, but it should be visible in the column properties tab if you select the date field of your table …

  7. SQL SELECT WHERE with date and time - Stack Overflow

    Dec 12, 2011 · I have a SELECT query where I want to find all rows whose DATE and TIME are between 2011-12-11 23:00:00 and 2011-12-12 23:00:00 I try to do it with WHERE but row is empty …

  8. SQL - Select only 'Year' from DateTime field - Stack Overflow

    Oct 3, 2015 · Your datetime field apparently is not a datetime field but a character field. That means to things. First of all, you shouldn't store date times as text, but rather in the specific date and time …

  9. How to select date without time in SQL - Stack Overflow

    Feb 26, 2011 · It seems to combine the SQL Server T-SQL GetDate() with the Oracle PL/SQL TO_DATE(). If it did work, it appears to involve an unnecessary date/time to text to date conversion, …

  10. sql - How to SELECT year using a WHERE clause on a DateTime type …

    May 12, 2019 · There is a table Saleswith data from year 2005 to year 2015 I want to query data and filter column Sales_Date with datetime data type where the year is 2013 including all other columns …