About 203,000 results
Open links in new tab
  1. sql server - SQL query not working with function DateAdd - Stack …

    Dec 22, 2021 · select DATEADD (day,-1,cast (getdate () as date)) as yesterday from dual; I am using this query for subtracting one day from date but this is showing invalid identifier in my sql …

  2. sql - Issue with DATEADD Function - Stack Overflow

    Jan 6, 2017 · I have huge calculations happening in SQL based on the dates and years. When I add months to a date its not adding based on the days, its primarily adding 3 months (thats the …

  3. sql server - The datepart hour is not supported by date function ...

    Mar 29, 2017 · The datepart hour is not supported by date function dateadd for data type date Asked 12 years, 8 months ago Modified 8 years, 7 months ago Viewed 37k times

  4. SQL Server : DATEADD 29 February not return 30,31 January

    Jan 29, 2020 · I'm working in SQL Server 2014 and need calculate exactly one month previous from a SQL Server DateTime, but I'm unable figure out how to use DATEADD correctly. …

  5. sql server - Pass Interval parameter to Function in SQL - Stack …

    Nov 29, 2010 · Below is a function that encapsulates my problem. Consider: CREATE FUNCTION [dbo].[DateAdder] (@DateStart datetime, @increment int, @interval ?????) …

  6. sql server - DATEADD FUNCTION SQL - Stack Overflow

    Jan 1, 2017 · 0 I want to select data from 1st jan 2017 till 31 dec 2018 . I have a query where I have used BETWEEN DATEADD(year,-1,GETDATE()) AND DATEADD(year,1,GETDATE()) …

  7. sql server - DateAdd function in Oracle SQL - Stack Overflow

    Aug 26, 2020 · How can I convert DATEADD(week,-4,GETDATE())in the where clause ( in Oracle SQL) Trying to get data for prior 4 weeks SELECT DISTINCT LOWER(C.EMAIL) AS EMAIL, …

  8. sql server - DATEADD issue when negative number is used with …

    Apr 14, 2016 · 0 simple workflow for dateadd function ie. for Day -it's add day (next valid day) for week -it's add week (next 7 days) for month -it's add month (next month only and fill forward if …

  9. sql server - SQL DATEADD Not returning quarter ends - Stack …

    Sep 30, 1997 · I am trying to use the DATEADD function to add a quarter to a date. My environment is MS Mgmt Studio (v17.7) and SQL Server Express (14.0.1000). Based in the …

  10. sql server - Convert Month Number to Month Name Function in …

    Oct 9, 2008 · To get around the problem of subtracting 1 from your datetime, use a datetime in December as opposed to January. For example SELECT DATENAME (month, DATEADD …