Re: IFF Statement
- From: "Tom Ellison" <tellison@xxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 13:37:08 -0600
Dear Gloria:
Your "number list" contains strings. You want to look at the last
character. Use Right([number list], 1) to get this. Convert that to an
integer like this:
CInt(Right([number list], 1))
Use DateAdd to add this many years to 12/31/2005.
DateAdd("yyyy", CInt(Right("12-99997", 1)), CDate("12/31/2005"))
This yields12/31/2012
Sound good?
Tom Ellison
"Gloria" <Gloria@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:51C80CE5-408C-4171-8FF3-08F6289061D0@xxxxxxxxxxxxxxxx
Here is the scenario. I have a list of numbers and due dates. I need to
create a query and an IIF statement. The IIF statement has to say:
iif([number list]=**-****1, "12/31/2006")
number list
12-23121
32-12542
42-12541
Than I have due dates:
all numbers ending on "1" due date is 12/31/2006
all numbers ending on "2" due date is 12/31/2007
My question is what wildcard can I use to remplace the "???" on my
expression? Or is there another way to complete my IIF statement?
.
- Prev by Date: Re: Calculating # of Shifts Between 2 Date/Times
- Next by Date: Re: Access Query - Don't know what type to use - Inner Join? Updat
- Previous by thread: Re: IFF Statement
- Next by thread: four columnes into one
- Index(es):
Relevant Pages
|