About 16,500,000 results
Open links in new tab
  1. How do I query for all dates greater than a certain date in SQL Server ...

    where A.Date >= '2010-04-01' it will do the conversion for you, but in my opinion it is less readable than explicitly converting to a DateTime for the maintenance programmer that will come after you.

  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. sql - Get the week start date and week end date from week number ...

    I have a query that counts member's wedding dates in the database. SELECT SUM(NumberOfBrides) AS [Wedding Count] , DATEPART( wk, WeddingDate) AS [Week Number] , DATEPART( year, …

  4. 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 portion (not …

  5. sql - Check if value is date and convert it - Stack Overflow

    May 8, 2013 · 15 I receive data in a certain format. Dates are numeric (8,0). For example 20120101 = YYYYMMDD There exists rows with values like (0,1,2,3,6) in that date field, thus not a date. I want to …

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

    Jan 8, 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 Get the FULL month name from a date - Stack Overflow

    Apr 1, 2009 · How do I use sql to get the whole month name in sql server? I did't find a way using DATEPART(mm, mydate) or CONVERT(VARCHAR(12), CreatedFor, 107). Basically I need in the …

  8. How to get month name from date in SQL Server - Stack Overflow

    Nov 25, 2022 · I have added a column name month_added, I run the query to extract the month from the date_added column in my table but I get an error: ERROR: column "date_added" does …

  9. sql - Select info from table where row has max date - Stack Overflow

    SELECT group,MAX(date),checks FROM table WHERE checks>0 GROUP BY group ORDER BY group DESC problem with that though is it gives me all the dates and checks rather than just the max date …

  10. sql - How to get calendar Quarter from a date in TSQL - Stack Overflow

    Oct 12, 2016 · I have different dates in a column. For example: 20080102 20070821 I want to convert these dates in Year and calendar quarter. E.g., Year Quarter 2008 2008-Q1 2007 2007-Q3 I can ...