Is date and time evaluted in query (1 Viewer)

ebs17

Well-known member
Local time
Today, 21:47
Joined
Feb 7, 2020
Messages
1,990
put ... date and time ... back together again
The power of addition:
Code:
? #1/21/2022# + #17:34:15#, Date + Time
21.01.2022 17:34:15         22.01.2023 18:29:56
? Date * 1, Time * 1, Date + Time, Now, Now * 1
44948         0,772581018518519          22.01.2023 18:32:31         22.01.2023 18:32:31          44948,7725810185
I don't understand the reference to DateAdd in this context.
 

jpl458

Well-known member
Local time
Today, 12:47
Joined
Mar 30, 2012
Messages
1,038
If you want to use a table in VBA, you need to open a recordset using DAO. But I sense confusion in your question. Are you asking how to permanently join the two? To do that, you would use an update query. First add the new datetime field to the table. Then create a querydef that updates the new field with the DateAdd() calculation. Once the two fields are joined, delete the original two fields and change your forms/reports to work with the single field.

Otherwise, tell us what you want to do with the recordset and we can offer some advice.
After reading your post the best solution is to convert the master tabel to date. time. I ran a test that looks like this:

Code:
  lastDate = DateAdd("n", "[Mastertbl3].[starttime]", "[Mastertbl3].[calldate]")

Long term, less work to convert now.
 

Users who are viewing this thread

Top Bottom