I have a query that I have to place a beginning and ending date to select the
information needed. The date is always 30 days for the current date. Is
there a way to set up a query to select current date minus 30 days that I
will not have to change the date each time?
Thanks in advance for the help.
On Tue, 28 Feb 2006 12:41:27 -0800, Daniell wrote:
>I have a query that I have to place a beginning and ending date to select the
>information needed. The date is always 30 days for the current date. Is
>there a way to set up a query to select current date minus 30 days that I
>will not have to change the date each time?
>Thanks in advance for the help.
Hi Daniell,
SELECT DATEADD(day, -30, CURRENT_TIMESTAMP)
Hugo Kornelis, SQL Server MVP
|||Thanks Hugo, I will give that a try.
"Hugo Kornelis" wrote:
> On Tue, 28 Feb 2006 12:41:27 -0800, Daniell wrote:
>
> Hi Daniell,
> SELECT DATEADD(day, -30, CURRENT_TIMESTAMP)
> --
> Hugo Kornelis, SQL Server MVP
>
sql
No comments:
Post a Comment