Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATE SEPERATIONS OF 14 DAYS???

Status
Not open for further replies.

SMCmtg

Programmer
Mar 27, 2000
90
US
I want to seperate the children who have birthdates from this date for the next 14 days. Could anyone help me with the code for this filter. I am trying to use the Julian calender?

Thank you for the help. juandiegomcc@yahoo.com

and juandiegomcc@tecnored.com (in Argentina)
 
SMCmtg,

If the birthdates are stored as dates, the filter is straightforward:
Code:
DATE() <= birthday AND birthday <= ( DATE() + 14 )

Unless of course I misunderstood the question?
Diederik Vermeeren
verm1864@exact.nl
 
Diederik,

I got this from another source but it doesn't seem to work just right? It filters some but leave others.

public thisweek
Public futureweek
thisweek=week(date())
futureweek=week(date())+3
set filter to (week(dex.birthdate))=thisweek=.t. .and. (week(dex.birthdate))<futureweek=.t.
set order to birthdate
go top
thisform.refresh

My table is called dex.dex_id (for rolodex hi!) and birthdate is the field with the birthdates in it.

juandiegomcc.yahoo.com

 
or use:

BETWEEN(birthdate,DATE(),DATE()+14)

The reason the WEEK function isnt adequate for your case, is because it doesnt discriminate down to the specific day. Therefore day 1 of week 3 is no different in your calculation as day 7 of week 3...because they both fall in week 3. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top