Date & Time Problem

  • Thread starter Thread starter Mary/Phil Stewart
  • Start date Start date
M

Mary/Phil Stewart

I have a small Access 2k application that lists a number of terminals that
are contacted daily. The time & date field is formatted as: mm/dd/yyyy
hh:mm:ss. Presently, I have a query that lists the terminals not contacted.
I am using a criteria entry of <date(). The query shows those units last
contacted yesterday. I would like to list the terminals not contacted within
the last 24 hours.
Can someone help? Thank you.
Phil Stewart
 
Use a calculated field:
DateSince: DateDiff("h", [DateFieldName], Date())

Then use a criterion of ">24" for this calculated field.
 
You probably want to use Now() instead of Date().

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Ken Snell said:
Use a calculated field:
DateSince: DateDiff("h", [DateFieldName], Date())

Then use a criterion of ">24" for this calculated field.

--
Ken Snell
<MS ACCESS MVP>

Mary/Phil Stewart said:
I have a small Access 2k application that lists a number of terminals that
are contacted daily. The time & date field is formatted as: mm/dd/yyyy
hh:mm:ss. Presently, I have a query that lists the terminals not contacted.
I am using a criteria entry of <date(). The query shows those units last
contacted yesterday. I would like to list the terminals not contacted within
the last 24 hours.
Can someone help? Thank you.
Phil Stewart
 
Back
Top