Connecting Tech Pros Worldwide Help | Site Map

Testing for time elapsed

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 11:37 AM
Barbara Warszycki
Guest
 
Posts: n/a
Default Testing for time elapsed

I need to test each transaction listed in a Transaction table to find out if
, as of "today",at least 14 days have past since the date listed in the
"ClosingDate" field. If this is true I want to have a "yes" show up in a
field called "is commission eligible to be paid?"

I also may need to test for other conditions in order for the yes to show.

I am totally at a loss for the proper way to put the expressions together.
Any help would be greatly appreciated.



  #2  
Old November 13th, 2005, 11:37 AM
fredg
Guest
 
Posts: n/a
Default Re: Testing for time elapsed

On Thu, 30 Jun 2005 20:05:27 -0400, Barbara Warszycki wrote:
[color=blue]
> I need to test each transaction listed in a Transaction table to find out if
> , as of "today",at least 14 days have past since the date listed in the
> "ClosingDate" field. If this is true I want to have a "yes" show up in a
> field called "is commission eligible to be paid?"
>
> I also may need to test for other conditions in order for the yes to show.
>
> I am totally at a loss for the proper way to put the expressions together.
> Any help would be greatly appreciated.[/color]

Something like this in the control source of an Unbound control on a
form, report, or as an expression in a new column in a query:

=IIf(DateDiff("d",[ClosingDate],Date())>14,"Yes","No"))

This should not be stored in any table. Whenever you need the
information, run the calculation, as above.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.