| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: MS SQL 2000
Here is what I did before I saw your post and it works.
WHERE (CONVERT(varchar(12), Acclaim.Job.JobDate, 101) <=
CONVERT(varchar(12), DATEADD(day, 14, GETDATE()), 101)) AND
(Acclaim.Job.JobDate > GETDATE())
If I change it to
WHERE Job.Date <= DATEADD (week, 2, Job.Jobdate) AND Job.Date > GETDATE()
Would this accomplish the same thing? I though I read that the Date/Time had to be converted to a variable to calculate properly.
Thanks for your help.
Hugo Kornelis wrote:
> On 10 Jan 2005 09:10:14 -0800, Kirby wrote:
>
> >I need an sql WHERE statement to extra data where the Job.JobDate
is
> >between the current date and the current date + two weeks.
>
> Hi Kirby,
>
> To calculate the current date plus two weeks, you use
> DATEADD (week, 2, Job.Jobdate)
>
> The rest of your statement is trivial. The DATEADD function is
described
> in detail in Books Online.
>
> Best, Hugo
> --
>
> (Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Thu Jan 13 2005 - 07:47:27 CST
![]() |
![]() |