Days left for impact

  • Thread starter Thread starter AL Rios
  • Start date Start date
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
 
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
 
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())
 
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())
 
Back
Top