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!

Filtering Dates

Status
Not open for further replies.

Prisk

Programmer
Oct 8, 2007
9
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