About 21,700,000 results
Open links in new tab
  1. SQL Query Where Date = Today Minus 7 Days - Stack Overflow

    I have a SQL table of hits to my website called ExternalHits. I track the URL as URLx and the date the page was accessed as Datex. I run this query every week to get the count of total hits from …

  2. sql - How do I use select with date condition? - Stack Overflow

    Mar 30, 2009 · In sqlserver, how do I compare dates? For example: Select * from Users where RegistrationDate >= '1/20/2009' (RegistrationDate is datetime type) Thanks

  3. How to return only the Date from a SQL Server DateTime datatype

    Sep 22, 2008 · The datetime data type cannot have no time at all. I think you are confusing data storage with user presentation. If all you want is a way to show a user a string that has no time …

  4. How do I query for all dates greater than a certain date in SQL …

    select * from dbo.March2010 A where A.Date >= Convert(datetime, '2010-04-01' ) In your query, 2010-4-01 is treated as a mathematical expression, so in essence it read select * from …

  5. SQL query to select dates between two dates - Stack Overflow

    Feb 26, 2011 · I have a start_date and end_date. I want to get the list of dates in between these two dates. Can anyone help me pointing the mistake in my query. select Date,TotalAllowance …

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

    AND (date <= '2011-12-12' AND time < '23:00:00') The EXPLAIN plan for either situation should result in a fast execution of the query with the use of the date_time index.

  7. sql - Previous Monday & previous Sunday's date based on today's …

    Mar 9, 2012 · I need the correct syntax to give me : Previous week's Monday's date based on the current date/time using GETDATE () Previous week's Sunday's date based on the current …

  8. How to convert java.util.Date to java.sql.Date? - Stack Overflow

    Feb 9, 2009 · I am trying to use a java.util.Date as input and then creating a query with it - so I need a java.sql.Date. I was surprised to find that it couldn't do the conversion implicitly or …

  9. sql - Select data from date range between two dates - Stack …

    Jan 5, 2013 · Now what is the query if I want to select sales data between two dates from a date range? For example, I want to select sales data from 2013-01-03 to 2013-01-09.

  10. 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?