You are watching: 15 days before today
Here is my query:
You can use
CONVERT(date, DATEADD(DAY, -15, GETDATE()))insted your fix day Value.
With this password you recieve the current Date GetDate() and substract 15 work DateAdd(day, -15, DateValue)
Finaly you transform it into date Typ Convert(date, value) otherwise girlfriend would obtain the existing time, too.
Your query must be together follow:
select pr.Job_Number, Count(ItemCode1) as
Thanks because that contributing an answer to ridge Overflow!Please be certain to answer the question. Provide details and share your research!
But avoid …Asking for help, clarification, or responding to other answers.Making statements based upon opinion; back them up with referrals or an individual experience.
See more: Yer Metal Is Olde: Today Is The Day Temple Of The Morning Star
To learn more, watch our tips on writing an excellent answers.
article Your prize Discard
Not the answer you're feather for? Browse other questions tagged sql-server counting days or ask your own question.
site style / logo design © 2021 stack Exchange Inc; user contributions licensed under cc by-sa. Rev2021.9.21.40253