Date look ups : Microsoft Access

  • Thread starter Thread starter Boz.theale
  • Start date Start date
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
 
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.
 
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.
 
Back
Top