ok, i have a table with [Date] & [Amount] i need to pull some specific dates. for example, i need to pull 2/16/01, if 2/16/01 is a sun or sat then i need to pull the friday before. there are no dates in my table for the weekend so i have been trying to use this formula:
IIf(DateAdd("m",-3,Date())-1 Is Null,(DateAdd("m",-3,Date())-2),(IIf(DateAdd("m",-3,Date())-2 Is Null,(DateAdd("m",-3,Date())-3),DateAdd("m",-3,Date())-1)))
but it does not work right. it works if the date is a sat, but not a sun. is there a better way to do this? i am doing this in the criteria of a query.
the reason i subtract one to start off with is because i always need the day befores info. and i need the same day for the past 12 months. so i need
3/16/01
2/16/01
1/16/01
12/16/00 etc.
any help would be greatly appreciated.
Thanks
Jared
IIf(DateAdd("m",-3,Date())-1 Is Null,(DateAdd("m",-3,Date())-2),(IIf(DateAdd("m",-3,Date())-2 Is Null,(DateAdd("m",-3,Date())-3),DateAdd("m",-3,Date())-1)))
but it does not work right. it works if the date is a sat, but not a sun. is there a better way to do this? i am doing this in the criteria of a query.
the reason i subtract one to start off with is because i always need the day befores info. and i need the same day for the past 12 months. so i need
3/16/01
2/16/01
1/16/01
12/16/00 etc.
any help would be greatly appreciated.
Thanks
Jared