Removing time from date/time to do date calculations

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

Guest

I have an Access2000/02 .mdb with a linked table from SQL Server. The table
has two columns, "ActualCompletionDate", and "ReceivedDate"

I want to show the number of days between, and i have a column in my query
that is Diff: [ActualCompletionDate] - [ReceivedDate] which works, but both
of these columns are date/time, and I only want date. So when I try to
format them in a query, I either get a type mismatch, or a parameter box.
The TypeMismatch is

Diff: (Format("ActualCompletionDate","MM/DD/YYYY") -
Format("ReceivedDate","MM/DD/YYYY"))

I've tried to coerce the dates as well using cdate and get the same thing.
 
Jamie Roberts said:
I have an Access2000/02 .mdb with a linked table from SQL Server. The table
has two columns, "ActualCompletionDate", and "ReceivedDate"

I want to show the number of days between, and i have a column in my query
that is Diff: [ActualCompletionDate] - [ReceivedDate] which works, but both
of these columns are date/time, and I only want date. So when I try to
format them in a query, I either get a type mismatch, or a parameter box.
The TypeMismatch is

Diff: (Format("ActualCompletionDate","MM/DD/YYYY") -
Format("ReceivedDate","MM/DD/YYYY"))

I've tried to coerce the dates as well using cdate and get the same
thing.

Use DateDiff() and then you don't need to strip the time off.
 
Back
Top