I have a query like this on Sql Server 2008: DECLARE @START_DATE DATETIME SET @START_DATE = GETDATE() SELECT * FROM MY_TABLE
My raw sql statement is as follows: select* from t where dateadd(ss,closeda开发者_运维知识库te-datediff(ss,getdate(),getutcdate()),\'1970-1-1\')
I\'ve got an inventory report I\'m working with which calculates our average weekly consumption of a particular part and then divides it by what we have on hand to show us a numerical \"weeks on hand\
Like date_add there are many functions date_diff, date_format etc having a corresponding alias in DateTime class.
I need to find the last occurence of a date (in my case a static date 1st of may) I made this which works but i know this can be done in a much smarter way
This really puzzled for hours, I searched all over the internet, but got no working solution. Can someone point where the problem is ... thanks !
Not sure how to take my current expression and get the week ending date of the week. My current expression returns the date, one week from today.
Suppose I have a datetime field whose value is 2000-01-01 08:30:00 and a duration field whose value is say 00:15 (meaning 15 minutes)