Month Date Link Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables that I would Like to link by Month and year. So if I have a
Date of 1 Jan 05 in one table and a date of 10 Jan 05 in the 2nd table they
would link.

one field is [B_Date] and the 2nd is [CW_St_Time]

Thanks
 
KAnoe said:
I have two tables that I would Like to link by Month and year. So if I have a
Date of 1 Jan 05 in one table and a date of 10 Jan 05 in the 2nd table they
would link.

one field is [B_Date] and the 2nd is [CW_St_Time]

You can do joins on expressions but they are not efficient and you can't create
such a query in the graphical query designer. Just create the query in the
designer joining on the date fields and then switch to SQL view and change the
join to something like...

From Table1 Join Table2
On Format([Table1]![B_Date], "yyyy-mm") = Format([Table2]![CW_St_Time],
"yyyy-mm")
 
Thanks for your Help Rick!

Keith

Rick Brandt said:
KAnoe said:
I have two tables that I would Like to link by Month and year. So if I have a
Date of 1 Jan 05 in one table and a date of 10 Jan 05 in the 2nd table they
would link.

one field is [B_Date] and the 2nd is [CW_St_Time]

You can do joins on expressions but they are not efficient and you can't create
such a query in the graphical query designer. Just create the query in the
designer joining on the date fields and then switch to SQL view and change the
join to something like...

From Table1 Join Table2
On Format([Table1]![B_Date], "yyyy-mm") = Format([Table2]![CW_St_Time],
"yyyy-mm")
 
Back
Top