Re: criteria and dates
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Tue, 13 Sep 2005 15:25:41 -0500
kryszystof via AccessMonster.com wrote:
>i have a query, and i want to create an expression that depends on a date
>field.
>
>i have
>
>Field1 | Field2
>Date Expr
>
>field 2is such: adj1: iif([DateField] >= "01/01/2002",[do calculation], " ")
>
>i think it has to do with the date format that i am searching by, or possibly
>syntax?
Date values (as opposed to text strings) need to be enclosed
in # characters. In addition, you probably do not really
want to evaluate to a space character, or even a zero length
string when the date is before 1/1/02. I can't be sure from
your expression, but I think you want to use:
adj1: IIf([DateField] >= #1/1/2002#, [do calculation], Null)
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: criteria and dates
- From: kryszystof via AccessMonster.com
- Re: criteria and dates
- References:
- criteria and dates
- From: kryszystof via AccessMonster.com
- Re: criteria and dates
- From: kryszystof via AccessMonster.com
- criteria and dates
- Prev by Date: Re: Expr1002
- Next by Date: Re: Need a date query hero
- Previous by thread: Re: criteria and dates
- Next by thread: Re: criteria and dates
- Index(es):
Relevant Pages
|