Date look ups : Microsoft Access

B

Boz.theale

I have populated a table from another application with stock movement
transactions, each with a separate date (yyyy-mm-dd) and time
(hh-mm-ss) indicator.

I have another table that shows the exact cut off, down to the second,
for the start and end date and time of each financial period.

How can I get my transaction table to calculate the period based on the
date/time of each record?

Many thanks in advance
 
W

Wayne Morgan

You can't get a table to calculate anything. Tables just store data. You
will need to do the calculation in a query, form, or report. Check the
DateDiff VBA function in the help file.
 
V

Van T. Dinh

Tables don't do any calculations.

Also, the financial period the transaction belongs to is a "Calculated
Value" which can be derived from the transaction Date/Time so you should not
store this in your Table. Simply work out which financial period the
transaction belongs to whenever you need this value.

Another point is that you can simply use ONE DateTime Field to store BOTH
date and time. You don't need to use 2 Fields and using 2 Fields is less
efficient than using 1 Field.
 

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