Date Calculation

R

Rohit

Hi Experts!

Here is the Situation. I have 4 fields and this is what I
am trying to do.

Example:Tally Number|Date Received|Cubic Feet|Calculation
001 |12/17/03 | 1500 |

How can I write a query which evaluates the Following:

If Date Received >= 60 Days that means that the inventory
is being sitting at the warehouse for more then sixty days
(i.e. 02/17/2004) then multiply Cubic Feet * 0.15 and put
it into the above Calculation Field. If it is less then 60
days old then just put 0.

Thanks.
 
J

John Vinson

Hi Experts!

Here is the Situation. I have 4 fields and this is what I
am trying to do.

Example:Tally Number|Date Received|Cubic Feet|Calculation
001 |12/17/03 | 1500 |

How can I write a query which evaluates the Following:

If Date Received >= 60 Days that means that the inventory
is being sitting at the warehouse for more then sixty days
(i.e. 02/17/2004) then multiply Cubic Feet * 0.15 and put
it into the above Calculation Field. If it is less then 60
days old then just put 0.

Thanks.

I think I've answered this three times already, but here we go again.

In a vacant Field cell in your query type

Calculation: IIF(DateDiff("d", [Date Received], Date()) > 60, [Cubic
Feet] * 0.15, 0)
 
R

Rohit

Thanks very much it works
-----Original Message-----
Hi Experts!

Here is the Situation. I have 4 fields and this is what I
am trying to do.

Example:Tally Number|Date Received|Cubic Feet|Calculation
001 |12/17/03 | 1500 |

How can I write a query which evaluates the Following:

If Date Received >= 60 Days that means that the inventory
is being sitting at the warehouse for more then sixty days
(i.e. 02/17/2004) then multiply Cubic Feet * 0.15 and put
it into the above Calculation Field. If it is less then 60
days old then just put 0.

Thanks.

I think I've answered this three times already, but here we go again.

In a vacant Field cell in your query type

Calculation: IIF(DateDiff("d", [Date Received], Date()) > 60, [Cubic
Feet] * 0.15, 0)



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top