About 50 results
Open links in new tab
  1. DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) Can someone …

    this will give you the first of the month for a given date inner select select DATEDIFF(MONTH, 0, GETDATE()) will give the number of months from 1900-01-01 here it is 1350 this will be add to 1900 …

  2. sql - Is there a way to use the dateadd () in the where clause in a ...

    Nov 6, 2015 · Here's my problem. In my where clause I am trying to use the between clause with dates. In the second date I add, I need it to return the day after the date that is being input. For example: …

  3. How can I convert bigint (UNIX timestamp) to datetime in SQL Server?

    Select dateadd(S, [unixtime], '1970-01-01') From [Table] In case anyone wonders why 1970-01-01, This is called Epoch time. Below is a quote from Wikipedia: The number of seconds that have elapsed …

  4. Using Parameters in DATEADD function of a Query - Stack Overflow

    SELECT FieldOne, DateField FROM Table WHERE (DateField> DATEADD(day, @days, GETDATE())) Where @days = -10 Any ideas into what I am doing wrong? Incidentally I am setting this variable in …

  5. Update a date in SQL using DATEADD - Stack Overflow

    Sep 21, 2020 · I am trying to update several datetime records in a sql table. The values which i'm trying to update are all like this: 2019-01-01 23:59:59.000 and I'm looking to update them adding one …

  6. What is different between DATEADD (DAY, 1, GETDATE ()) and …

    Sep 11, 2018 · DATEADD(DAY, 1, DATEDIFF(DAY, 0, GETDATE())) Could someone help to show example case, how to use them?

  7. Is there any difference between these three uses of DATEADD?

    Jan 17, 2011 · Is there any difference between these three uses of DATEADD? Asked 15 years, 2 months ago Modified 15 years, 2 months ago Viewed 5k times

  8. Manipulating DATEADD to display date in correct format

    Jan 14, 2015 · DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1, 0) as [Last Month] Which is populating my table with 2014-12-01 but I want it to come out as 12/01/2014. I have tried numerous …

  9. How do I convert a value after using DATEADD with it

    Apr 27, 2018 · SELECT (DATEADD(hour,-5,arrival)) FROM( SELECT CONVERT(VARCHAR(8), arrival)) FROM locations )a 4-6-2018 12:35:43 This query will give readd the date. How can I remove …

  10. powerbi - Issue with DATEADD function in DAX - Stack Overflow

    Sep 24, 2016 · In essence, DATEADD expects a table column of dates as first parameter as most of Time Intelligence functions, which are designed to work with Date/Calendar tables (Date …