Days left for impact

A

AL Rios

I have two dates . Start date and End date.
In the form field I have a box with an expressiion ot calculate the date
difference. It works fine. But in reality what I'm trying to say is:

If Start date is greater then Date Now (Todays date) then days left is
Start day - End date. But is Start date is less then todays dates then days
left for impact is todays date minus End date.

I belive this provide better accuracy on the number of days left for impact.

Can Someone help?

Thanks

AL
 
T

Tom van Stiphout

On Tue, 7 Apr 2009 07:24:01 -0700, AL Rios

This may be a job for the IIf function. Look it up in the Help file.

-Tom.
Microsoft Access MVP
 
F

fredg

I have two dates . Start date and End date.
In the form field I have a box with an expressiion ot calculate the date
difference. It works fine. But in reality what I'm trying to say is:

If Start date is greater then Date Now (Todays date) then days left is
Start day - End date. But is Start date is less then todays dates then days
left for impact is todays date minus End date.

I belive this provide better accuracy on the number of days left for impact.

Can Someone help?

Thanks

AL

=IIf([StartDate]>Date(),[EndDate]-[StartDate],[EndDate]-Date())
 
A

AL Rios

Fred thanks for the help but i get an error...

The code I use to estabish date differene is below.

=DateDiff("d",[ImpactTimeframeEarliestDate],[ImpactTimeframeLatestDate])

I replace my code with yours using yours by replacing the start and end
dates code


=IIf([ImpactTimeframeEarliestDate]>Date(),[ImpactTimeframeLatestDate]-[ImpactTimeframeEarliestDateStart],[ImpactTimeframeEarliestDate]-Date())

But I get an error..

Thanks

Al

fredg said:
I have two dates . Start date and End date.
In the form field I have a box with an expressiion ot calculate the date
difference. It works fine. But in reality what I'm trying to say is:

If Start date is greater then Date Now (Todays date) then days left is
Start day - End date. But is Start date is less then todays dates then days
left for impact is todays date minus End date.

I belive this provide better accuracy on the number of days left for impact.

Can Someone help?

Thanks

AL

=IIf([StartDate]>Date(),[EndDate]-[StartDate],[EndDate]-Date())
 

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