Re: How to join date/time field when "days" are same but "time" differ

Tech-Archive recommends: Speed Up your PC by fixing your registry



Use the DateValue function.

I have to question why your Price table has a single Date/Time value in it,
though. Shouldn't you perhaps have EffectiveFrom and EffectiveTo fields, and
you'd then match the transaction's date using TransactionTime BETWEEN
Price.EffectiveFrom AND Price.EffectiveTo?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Mikael Lindqvist" <MikaelLindqvist@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:2A455D89-C105-4C26-8823-56559F2FAA1A@xxxxxxxxxxxxxxxx
Good evening everyone,

I have one TRANSACTION table that contains:
1."date/time" field (YYMMDD hh:mm:ss)
2."quantity field"

And another PRICE table that contans:
1."date/time" field (YYMMDD hh:mm:ss)
2."price field"

Now, I want to join the "date/time" fields so I can perform a simple
"quantity * price" calculation on each transaction-row.

But the time differes (hh:mm:ss) and I just can't find a way to make
Access
accept a relation between the days (it outputs nothing). How can I make it
ignore difference in the "time-section" and only look at the YYMMDD
section?

Kindly,
Mikael
Sweden


.