DateAdd function (1 Viewer)

LEXCERM

Registered User.
Local time
Tomorrow, 06:30
Joined
Apr 12, 2004
Messages
169
Hi All,

I've been using the DateAdd function to great effect, but am stumped on a solution for this problem.

I have a table full of dates which run in sequence, i.e. 1/9/15, 2/9/15, 3/9/15 and so on.

I require a query to show me dates for just every two weeks starting from the 1/9/15, i.e. 1/9/15, 15/9/15, 29/9/15 and so on.

Thanks in advance. :)

Regards.
 

namliam

The Mailman - AWF VIP
Local time
Today, 20:30
Joined
Aug 11, 2003
Messages
11,695
Something like this should work:
Code:
Select *
from yourtable
where (Yourdatefield - #09/07/2015#) / 14 = int((Yourdatefield - #09/07/2015#) / 14)
 

LEXCERM

Registered User.
Local time
Tomorrow, 06:30
Joined
Apr 12, 2004
Messages
169
That's awesome namliam!

Thanks very much for your quick reply. :)
 

Users who are viewing this thread

Top Bottom