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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering Dates

Status
Not open for further replies.

Prisk

Programmer
Joined
Oct 8, 2007
Messages
9
Location
GB
Hi,

I'm trying to write a formula that selects dates from a table but does not select any dates starting with -
25/12
26/12
31/12
01/01

I've tried using Day({date_field}) <> 1 and
month({date_field}) but this also excludes all dates starting with 1
 
Hi,

How about...
Code:
  IF Month({date_field}) = 12 and NOT (Day({date_field}) IN [25, 26, 31]) THEN
     FALSE
  ELSE IF Month({date_field}) = 1 AND Day({date_field}) = 1 THEN
     FALSE
  ELSE
     TRUE

Hope that helps....

doc tree
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top